For ino on problems related to ContentDisposition, ee: ContentDisposition: inline; ContentDisposition bug media files, Safari for OSX and iOS:Mar 11, 2009 iPhone Email Attachments Revisited March 11, 2009 March 11, 2009 by davidjhinson My solution for sending messages via email on the iPhone detailed here works for every mail client except Gmail. iphone content-disposition inline
With inline, the browser will try to open the file within the browser. For example, if you have a PDF file and FirefoxAdobe Reader, an inline disposition will open the PDF within Firefox, whereas attachment will force it to download.
While all of this may seem a bit pedantic, since ContentDisposition filename specification is not, as far as I know, a widely used feature, it should still be in the spirit of the WebKit project to make sure Safari makes optimal use of the information it receives about downloaded documents. ContentDisposition: attachment; filenamefile. pdf iOS just ignores this and displays the image or document. No big deal, you might think, except I'm doing this in a hidden IFRAME as part of my download page, so the document is never even seen, and it looks like the download failed.iphone content-disposition inline May 30, 2008 Now, why exactly does this work? Im not sure, so if you know please tell me.
ContentDisposition: attachment; filenamefile. pdf iOS just ignores this and displays the image or document. No big deal, you might think, except I'm doing this in a hidden IFRAME as part of my download page, so the document is never even seen, and it looks like the download failed. iphone content-disposition inline Note that AFAICT contentdisposition is not part of the formal HTTP1. 1 spec, just an oftenimplemented extension, so the fact that the iOS web view doesn't support it is not strictly speaking a bug (and it seems pretty clear given things like the tech note above that it's intentional on Apple's part). ContentDisposition: inline ContentDisposition: attachment ContentDisposition: attachment; As a header for a multipart body. The first parameter in the HTTP context is always formdata. Additional parameters are caseinsensitive and have arguments that use quotedstring syntax after the sign. When you're sending a picture from a iPhone, that's what you have: ContentDisposition: inline; base64