1

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?

ispiro
  • 26,556
  • 38
  • 136
  • 291
  • That sounds like what application/octet-stream is for: https://stackoverflow.com/q/20508788/534109 – Tieson T. Jun 16 '19 at 20:36
  • @TiesonT. Thanks. That, indeed looks like it. (Though by the comments there, it looks like it's not necessarily going to work...) You can transform your comment into an answer. – ispiro Jun 16 '19 at 20:44

2 Answers2

1

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.

ispiro
  • 26,556
  • 38
  • 136
  • 291
-1
  1. Download the file in your destination .
  2. Make the zip algo then attach these files into your zip.
  3. Then download your zip file.

If you are direct downloading file bind with zip file it will not work, because zip file need actual path not remote path.

Shahzad Khan
  • 432
  • 2
  • 14
  • what happen? and if you have any query then ask me, please don't devote it's hurt because if you're passing any comment and just doing the devoting what we will suppose to tell you. – Shahzad Khan Jun 18 '19 at 13:19