Correct headers, but Chrome says "Resource interpreted as Document" Correct headers, but Chrome says "Resource interpreted as Document" google-chrome google-chrome

Correct headers, but Chrome says "Resource interpreted as Document"


I think that means Chrome is trying to display the file as a webpage, which is not what you wanted.

Add the header: Content-Disposition: attachment; filename="filename.ext"


I got the same problem; I had a formular based post request which resulted in a file. Having the MIME Type and Content-Disposition set generated that very warning. I somewhere read, that new files should be openend in a new tab and the warning vanished.(But also could be because the new page was open and closing in no time ... so I couldn't verify if that warning appeared there)

Best,Jan