supabase / supabase-js

An isomorphic Javascript client for Supabase. Query your Supabase database, subscribe to realtime events, upload and download files, browse typescript examples, invoke postgres functions via rpc, invoke supabase edge functions, query pgvector.
https://supabase.com
MIT License
2.86k stars 220 forks source link

Should throw an error if special characters are being used in the name of the file #960

Open onmax opened 3 months ago

onmax commented 3 months ago

Bug report

Describe the bug

Given this code:

const name = new Date().toISOString() + '.txt' // `2024-01-29T10:48:15.595Z.txt`
await client.storage.from('my-bucket').upload(name, 'mycontent')

I expect an error to be thrown but nothing happens, and it looks that everything went ok.

To Reproduce

  1. Prepare your self a bucket with correct RLS
  2. Copy the code from above and try to execute. No error is thrown
  3. Go to the dashboard. The file is not there

Expected behavior

An error should be thrown.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

Additional context

https://github.com/supabase/supabase/issues/20822