Short answer
Check the bucket’s allowed MIME types in the dashboard and the content type your upload sends. Add the missing type to the bucket, convert the file before upload, or pass the right contentType. Prefer an explicit list, such as image/jpeg, image/png, image/webp and image/heic, over image/*.
Rather not fix it yourself? App Fix Ticket starts with a fixed-price diagnosis, then a fixed price for the fix before any fix work.
Why the file type is rejected, and the fix
01
The bucket doesn’t allow that type
A bucket created with allowedMimeTypes rejects types outside the list. iPhones save HEIC photos, and many tools export WebP, so a JPEG and PNG list misses them. Edit the list in the dashboard under the bucket’s settings.
02
The upload sends the wrong content type
“By default, Storage will assume the content type of an asset from the file extension.” Supabase docs, Standard uploads (Content type)
Without a file extension, Storage can’t infer the type. Pass the real type with the upload, and stop if the browser reports none.
if (!file.type) throw new Error('Unknown file type'); await supabase.storage.from('avatars').upload(path, file, { contentType: file.type, });03
The contentType value is malformed
“The specified MIME type is not valid.” Supabase docs, Storage error codes (InvalidMimeType)
A value like jpg or image instead of image/jpeg isn’t a MIME type. Send the full type and subtype.
04
The rule is right and the file is wrong
If the bucket should only take images, keep the rule. Check the type in the browser before upload and show the user which formats work.
Checked against the vendor’s docs on : Supabase docs: Storage error codes; Supabase docs: Creating buckets; Supabase docs: Standard uploads.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.See scope and start
“Very responsive, attentive to fixing bugs, and completed the project as needed! Thank you!”
Related: Supabase Storage InvalidKey · Supabase Storage EntityTooLarge · Supabase Storage bucket is public · Supabase invalid input syntax for type uuid