uploading audio file
Hi, im generating an uplaod url
and then using rnfetchblob ~ https://www.npmjs.com/package/rn-fetch-blob#user-content-upload-example--dropbox-files-upload-api
my files are uploading but the audiofile is not playable,.
I've tried quite a bit, is there any specific config i should be setting up on the generate url?
9 Replies
Hey, is the file playable if you download it from your dashboard (Deployment > File Storage) and play it on your computer?
Is it in the format you expect?
This problem sounds unrelated to Convex, and more likely something to do with encoding on the write side or the player on the read side. Convex should be storing whatever bits you give it.
You might also inspect the content type headers used to upload / download and see if those match what you expect for the format. The download url content type should match the upload
the file is not playable in the dashboard
it could be an issue on my end, it seems like its only uploading the path as a string as the size changes based on the string length
if i send the file as form data the type never sticks in the file storage
if i send it as an m4a it never plays
Definitely sounds like a problem with the upload code, mind sharing it?
If I manually upload an m4a file to the dashboard I can download it and play it again.
@Michal Srb I just happen to stumble accross this problem... At random times, m4a files never play, seeem like data corruption happens when it is sent from React Native app to Convex which is strange. The audio is generated from
expo-audio



When I copy the same file from the generated audio in the file system and play, it works


Hi @Mordsith! I tried to upload M4A files to the dashboard and play them and I had no issues. Could you please send me a file that has the issue?
Hi @Nicolas
When I upload the same generated file from the dashboard, it works fine I'm guessing the problem is from the
FileSystem.uploadAsync
function in code, I'm not sure. Discord is not allowing me upload the m4a file. I'll retry with multipart/form-data
Thanks! I don't have the time to investigate the issue more at the moment unfortunately. Have you maybe tried to use another file storage provider (like AWS S3, Cloudflare R2, etc) to try to see if it’s a bug specific to Convex?