c# - File types change into .xml while downloading in Firefox -


in asp .net application can upload doc files , after uploading files can view in browser. working in browser, there 1 issue while view through firefox, while clicking hyperlink view file being download, file type changes .xml (xml extension). there problem while open it. can open making changes in firefox settings not practical in clients machine. working in previous version firefox. , still working in other browser chrome , ie, , downloads in same file type while clicking hyperlink view. how can download files original file type in firefox. please me

are setting mime type response.contenttype correctly? e.g.:

httpcontext.current.response.contenttype = "text/xml"; 

also remember firefox having problem spaces in filenames - had escape them. might extension getting cut off. years ago, might not relevant anymore. can check out anyways:

incorrect: response.addheader("content-disposition", string.format("attachment;filename={0}", filename));

correct: response.addheader("content-disposition", string.format("attachment;filename=\"{0}\"", filename));


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -