SyntaxFix
Write A Post
Hire A Developer
Questions
As explained by Alex's link you're probably missing the header Content-Disposition on top of Content-Type.
Content-Disposition
Content-Type
So something like this:
Content-Disposition: attachment; filename="MyFileName.ext"