supabase/storage-js

Storage - storing a filename with a "#" character causes filename to be silently mangled

yowzadave opened this issue · 0 comments

Bug report

Describe the bug

Storing a filename with a "#" character results in everything subsequent to the "#" being ignored in the stored filename. It seems like this is due to the name being turned into a URI with the "#" not URI-encoded, which results in Supabase interpreting it as a hash.

To Reproduce

Store any object as a file with a "#" character:

const result = await supabase.storage
  .from("files")
  .upload("files/My#1FavoriteBands.png", data, { contentType: "image/png" });

The resulting object will have the name "files/My".