Chrome adds "-, attachment" to downloaded file Chrome adds "-, attachment" to downloaded file google-chrome google-chrome

Chrome adds "-, attachment" to downloaded file


I know this is a pretty old discussion, but if anyone gets here looking for help with this, I determined that chrome seems to want a semicolon at the end of the filename and then it's happy. As in (VBScript):

Response.AddHeader "Content-Disposition", "attachment;filename=Something.xls;"

That fixed it for me.-Dave


I had the same problem in ZEND because I found a lot of non working stuff I wanted to add my anwser to this post. Since it took me a while to solve it thought more users and developers would wanted to know how I solved it. I add this just before my fopen call.

header('Content-Disposition: attachment; filename='.time().'.csv');

Solved the issue for me. Before I used a contextswitched what was buggy but now it works as a charm. Do not forget to remove previous content disposition headers hence you might get a double header error.