content-disposition

Force to open "Save As..." popup open at text link click for pdf in HTML.

Hi Friends, I have some big size pdf catalogs at my website, and I need to link these as download. When I googled, I found such a thing noted below. It should open "Save As..." popup at link click.. <head> <meta name="content-disposition" content="inline; filename=filename.pdf"> ... but it doesn't work :/ when I link to fil...

.NET image handler stripping filetype on download

I have created an ashx handler to render image thumbnails from images in a mysql database. If a file name is passed through querystring, the content disposition filename is set (when user clicks "save as..." the filename appears). The images appear properly and the filename appears when user selects "save as..." but the filetype is lis...

PHP: RFC-2231 How to encode UTF-8 String as Content-Disposition filename

Scenario: (in PHP) I have a form submission with a UTF-8 encoded string ($name) to support international characters. Upon submitting the form (via GET), I am creating a CSV download file. I want the name of the file to be that string + .csv ("$name.csv"). For a western character set I can do this just fine by doing: header("Content-Di...

Content-Disposition Special Characters

I have encountered an issue when trying to serve files with spanish tildes, related to the Content-Disposition encoding. The file name is "qué hacés ahora.docx" So far, the ASP.NET MVC way of serving files adds this header, which works fine only in Firefox: Content-Disposition: attachment; filename*=UTF-8''qu%C3%A9%20hac%C3%A9s%20ahor...

ASP.NET/Content-Disposition header + inline: saving file with correct name

Hi all, I've seen there's a general browser issue when we try to set the Content-Disposition header like "inline;filename=file1.doc": the browser shows the file, but when we try to save the file, the filename property isn't honored and the browser uses the page's name as the file's name (instead of file1.doc). Here's another thread disc...

Android browser/webview bug? Content-Disposition: attachment; filename="xyz.txt"

So an android browser or a webview works fine with urls like this - abc.com/xyz.txt However, if your URL looks like this - abc.com/xyz.php and what's sent to the browser in the headers is - Content-Disposition: attachment; filename="xyz.txt", then the Android browsers and web view seems to get terribly confused. It looks like it saves ...