Search code examples
asp.net.netiismime-types

How to tell a browser to download a custom file type?


I have a custom file type someType. I want to link to it so that when a user clicks the link, browsers will offer the user to download the file.

I know about MIME types, so I guess I could "lie" and add a MIME type that says it's like a zip file. But is there a more correct way of doing this? Some generic "download this" MIME type?


Solution

  • As pointed out in a comment, the best option is:

    application/octet-stream
    

    However, it doesn't seem to work perfectly. But anyway, that seems like the best option.