supabase / storage

S3 compatible object storage service that stores metadata in Postgres
https://supabase.com/docs/guides/storage
Apache License 2.0
764 stars 107 forks source link

Uploaded file in supabase storage is corrupted #492

Closed hyochan closed 4 months ago

hyochan commented 4 months ago

Bug report

Describe the bug

I upload audio file from react-native expo app with supabase which could play locally. However, when it is sent to server, audio files are not playable. I don't understand how this happens.

Related: https://stackoverflow.com/questions/78265067/supabase-corrupting-file-react-native-expo

To Reproduce

https://github.com/crossplatformkorea/react-native-supabase-tutorial

  1. Create supabase storage and setup .env inside the repository
  2. Try uploading audio file in audio.tsx page. Upload will be successful but the file is corrupted.

Expected behavior

File should not corrupt.

Screenshots

Screenshot 2024-05-26 at 10 19 00 PM

System information

Additional context

https://stackoverflow.com/questions/78265067/supabase-corrupting-file-react-native-expo

hyochan commented 4 months ago

I have resolved this by encoding and decoding with base64.