You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A clear and concise description of what the bug is.
When uploading to Supabase Storage, the JS SDK calls toString on data before uploading when the file is not a File or Uint8Array (there may be others, I have not tested it).
Comment out the first line and uncomment the second line and notice the difference in the files uploaded.
Expected behavior
If unexpected input is provided (such as an Array), the function should fail instead of uploading a string representation of the file.
Screenshots
Chrome console, logging the input passed to upload.
GET request to download file (from chrome)
Response of above request:
Response for request where the file is uploaded as Uint8Array
System information
OS: [e.g. macOS, Windows]
Browser (if applies) [e.g. chrome, safari]
Version of supabase-js: [e.g. 6.0.2]
Version of Node.js: [e.g. 10.10.0]
Additional context
>> file 01H1FA0E1CGCTQKN0G2DZ09BX8
01H1FA0E1CGCTQKN0G2DZ09BX8: ASCII text, with no line terminators
>> file 01H1FAKQ7QS65CH4WVAAYGZAG1
01H1FAKQ7QS65CH4WVAAYGZAG1: data
The text was updated successfully, but these errors were encountered:
Bug report
Describe the bug
A clear and concise description of what the bug is.
When uploading to Supabase Storage, the JS SDK calls
toString
on data before uploading when the file is not aFile
orUint8Array
(there may be others, I have not tested it).To Reproduce
Comment out the first line and uncomment the second line and notice the difference in the files uploaded.
Expected behavior
If unexpected input is provided (such as an Array), the function should fail instead of uploading a string representation of the file.
Screenshots
Chrome console, logging the input passed to upload.
GET request to download file (from chrome)
Response of above request:
Response for request where the file is uploaded as Uint8Array
System information
Additional context
The text was updated successfully, but these errors were encountered: