Skip to content
Back

Incorrect MIME type in storage.createFile

  • 0
  • Web
  • Storage
Satyam Bhosale
16 Jun, 2025, 11:00

I’m facing an issue with storage.createFile.

I’m trying to upload a .css file and I’ve explicitly set the MIME type to "text/css" when creating the file. But after uploading, the file in Appwrite storage still shows up with MIME type "text/plain".

Here’s what I’ve checked:

The file has the correct .css extension.

I passed "text/css" as the MIME type.

The file uploads successfully, but the type is still wrong.

Any ideas why this is happening or how to ensure the correct MIME type is stored?

TL;DR
Issue with storage.createFile. Developers upload .css file with MIME type "text/css" but files in storage show up as "text/plain". Correct extension and MIME type passed. Solution: Check Appwrite settings or modify file headers to set correct MIME type.
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