I've got a web api controller that returns an .xlsx file. I'm adding the filename in the header like this:
response.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment")
{
CreationDate = DateTime.Now,
FileName = wbName
};
In Chrome it shows up like this:
Content-Disposition:attachment; creation-date="Tue, 08 Jul 2014 09:43:50 GMT"; filename="=?utf-8?B? VW5rbm93biBXb3Jkcy1EZWNhcGl0YXRlZCBjaGFpbnNhdyBtdXJkZXIg4oCYdmljdGlt4oCZIG1heSBoYXZlIGtpbGxlZCBoaW1zZWx mLCBjbGFpbXMgbGF3eWVyLTA4LzA3LzIwMTQgMTM6NDM6NTAueGxzeA==?="
However, when I download the file in Safari iOS it doesn't decode the file name, it just uses the huge encoded string for the name of the file. I'm going to try to add the file name to the URL and see if that works but I'd thought I'd ask for ideas here. How do I set the file name so Safari iOS recognizes it?