Thursday, 18 May 2017

How can I create my own file type on Node?

I am wondering if I can change the mime-type of a file on Node. I have checked many mime-type libraries, but all of them are to get information from the files and from the system.

What I would like to achieve is to zip some files in one single file and then, change the mime-type. I could check if the file type is suited for my application.

I know there are differences between operating systems:

  • Windows. I change the extension and it is ready
  • Ubuntu. I must deal with mime-types. This is what I would like to change
  • Mac. They have a system similar to Ubuntu.

How to achieve this? At least on Ubuntu?

Assuming that I have just changed the mime-type of a zip file on Ubuntu, is it still going to detect the file as a zip file?



via ChesuCR

No comments:

Post a Comment