Back

[CLOSED] how to set MIME-Type of file while uploading it to storage?

  • 0
  • Self Hosted
  • Functions
  • Storage
kamal.panara
4 Sep, 2023, 07:45

when i upload my plist file to storage it saves it as MIME-type: text/xml instead i want it to be application/xml. or is there any way to update MIME type of file via functions? please help, new here.

TL;DR
The user wanted to know how to set the MIME-Type of a file while uploading it to storage. They discovered that it is done using a PHP function, but there seems to be no way to change it during the process. The user specifically mentioned that when uploading a plist file, it is saved with the MIME-Type 'text/xml' instead of 'application/xml' and they wanted to know if there was a way to update the MIME-Type of the file after uploading. The thread is closed and no solution is provided.
kamal.panara
4 Sep, 2023, 07:46

how to set MIME-Type of file while uploading it to storage?

Binyamin
4 Sep, 2023, 16:43

The mime-type sets for a file is done using a PHP function From what I looked there's no way to go in between that process or to change it.

Plist and XML aren't exactly the same, that's why I think PHP will treat it as text/xml

kamal.panara
5 Sep, 2023, 04:36

okay

Drake
5 Sep, 2023, 19:04

[CLOSED] how to set MIME-Type of file while uploading it to storage?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more