Closed
Bug 1192980
Opened 10 years ago
Closed 10 years ago
Content-Disposition filename not working for inline header directive
Categories
(Firefox :: Untriaged, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1180126
People
(Reporter: nealbailey, Unassigned)
Details
Attachments
(1 file)
92.44 KB,
image/jpeg
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240
Steps to reproduce:
In Firefox V39.0.3 the Content-Disposition header: inline;filename="myimage.jpg" is being replaced with the name of the page, e.g. GetFile.aspx
In Firefox V38.1.0 the correct filename is displayed. In both versions the header value attachment;filename="myimage.jpg" gives the correct name but forces a download, which is not sufficient for this application.
[code type=csharp]
var jpg = new HttpBinaryFile();
jpg.ContentType = "image/jpeg";
jpg.ContentDispositionHeaderName = "Content-Disposition";
jpg.ContentDispositionHeaderValue = "inline;filename=\"" + name + "\"";
// Correct name but forces a download
//jpg.ContentDispositionHeaderValue = "attachment;filename=\"" + name + "\"";
jpg.ContentTypeExtension = ".jpg";
[/code]
Actual results:
Right clicking on the image and selecting 'Save Image As' results in filename being the page name and not the filename from the header value. Instead of myfile.jpg it displayed GetFile.aspx
Expected results:
The browser should have used the filename from the header the way Firefox V38.1.0 and Internet Explorer does.
It's fixed in FF40+.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Flags: needinfo?(nealbailey)
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•