Skip to content

createSignedUploadUrl does not validate mime type. #1248

@saqibameen

Description

@saqibameen

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

If I create a signed upload url using createSignedUploadUrl and upload a file with a different mime type, it does not stop.

E.g.,
1- create signedUploadUrl for file.md
2- upload test.pdf buffer with Content-Type: application/pdf in headers
✅ Successfully uploaded

1- create signedUploadUrl for file.md
2- upload test.pdf buffer with Content-Type: text/markdown in headers
✅ Successfully uploaded

To Reproduce

Do following on the above two test cases:

  1. create SignedUploadUrl
  2. Upload file

Expected behavior

It should give error that mime type does not match.

Screenshots

NA

System information

  • OS: macOS
  • Version of supabase-js: 2.44.4
  • Version of Node.js: NA (using cloudflare worker)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions