I'm using the correct content type & Headers so Why is FireFox saving Zip Files without extensions
Posted
by The_AlienCoder
on Stack Overflow
See other posts from Stack Overflow
or by The_AlienCoder
Published on 2010-05-30T02:17:49Z
Indexed on
2010/05/30
2:22 UTC
Read the original article
Hit count: 285
Users on my site have the option to download all the photos in an album as a zip file.The Zip file is dynamically created and saved to Response.OutPutStream to be detected as a file download on the user's browser.
Here is the Header and Content-type I am outputing
context.Response.AddHeader("Content-Disposition", "attachment; filename=Photos.zip");
context.Response.ContentType = "application/x-zip-compressed";
..Well everything works fine with every browser except FireFox. Although Firefox correctly detects the download as a Zip file, It saves the file without the .zip extension. I thought adding this header
context.Response.AddHeader("Content-Disposition", "attachment; filename=Photos.zip");
..is supposed to force FF to save the extension. I believe I am following the correct protocol so why is FF behaving this way and how do I fix this?
© Stack Overflow or respective owner