payload size too large

How do I update supabase to allow large payloads of up to 2GB?
44 Replies
chovyfu
chovyfuOP4w ago
getting this error back from file upload api: {"statusCode":"413","error":"Payload too large","message":"The object exceeded the maximum allowed size"} i went to project settings and chagned storage payload size to 2GB but i'm still getting this error.
silentworks
silentworks4w ago
What is this payload for? it's best to show some code and mention what you are trying to do with which service in order for someone to help you.
chovyfu
chovyfuOP4w ago
its for uploading a file
chovyfu
chovyfuOP4w ago
the file is 23MB
silentworks
silentworks4w ago
If you are uploading a file larger than 6mb you need to use resumable uploads instead.
chovyfu
chovyfuOP4w ago
oh ffs. how do i do that?
Fieryduck82579
I interpreted that as a recommendation. You don't think in this case it is a matter of limitation on the storage bucket?
chovyfu
chovyfuOP4w ago
"Though you can upload up to 5GB files using the standard upload method, we recommend using TUS Resumable Upload for uploading files greater than 6MB in size for better reliability.
silentworks
silentworks4w ago
This could be the case too since I've uploaded larger than 2mb files using the UI before.
chovyfu
chovyfuOP4w ago
i have that set to 2GB i still can't upload
silentworks
silentworks4w ago
Try uploading in the UI itself and see if you face the same issue.
chovyfu
chovyfuOP4w ago
all i see is: Global file size limit Restrict the size of files uploaded across all buckets. Learn more.
silentworks
silentworks4w ago
Although I suspect the UI is using the resumable upload endpoint.
chovyfu
chovyfuOP4w ago
where do i do that?
silentworks
silentworks4w ago
Where do you do what?
chovyfu
chovyfuOP4w ago
upload in ui
chovyfu
chovyfuOP4w ago
wait i don't have a bucket created. how are files working now?
silentworks
silentworks4w ago
If you don't have a bucket created in the project you are trying to upload to then maybe that would explain why it's not working. Although the error should have been there is no such bucket.
chovyfu
chovyfuOP4w ago
i think its storing the data in db
silentworks
silentworks4w ago
If you are using the storage upload API it stores in a bucket, not the db.
chovyfu
chovyfuOP4w ago
can you tell from that curl if its using storage upload api?
silentworks
silentworks4w ago
https://xxxx.supabase.co/storage/v1 that's the storage endpoint Database REST endpoint would be https://xxxx.supabase.co/rest/v1
chovyfu
chovyfuOP4w ago
so how is storage API saving files to db then?
silentworks
silentworks4w ago
Storage API doesn't save files in db, it saves the path and metadata in db.
chovyfu
chovyfuOP4w ago
so where is the file stored then? lol if i don't have a bucket oh i know why. the metadata is a json object with the content of the encrypted file --- that's probably it i guess i gotta go learn about buckets now. does the db have a hardcoded size limit?
silentworks
silentworks4w ago
But there isn't any files stored according to your message as it's saying its too large.
Fieryduck82579
The https://xxx.supabase.co/storage/v1/object/sign/bucket-name/private_folder/prefix endpoint is used for generating signed URLs. I just checked.
chovyfu
chovyfuOP4w ago
no i have other files that worked.
silentworks
silentworks4w ago
If you don't have a bucket then there are no files being stored anywhere. At this point I can only think you are viewing the wrong project where there are no buckets.
chovyfu
chovyfuOP4w ago
but there are i see them in my UI
silentworks
silentworks4w ago
Which UI? the Supabase Dashboard? I though you said there were no buckets there?
chovyfu
chovyfuOP4w ago
damn. you're right i was looking at wrong project
silentworks
silentworks4w ago
It happens to the best of us
chovyfu
chovyfuOP4w ago
i f ound it! it was set to 50MB but my file is only 23MB maybe it grows when i encrypt it though. idk
silentworks
silentworks4w ago
Encrypting it shouldn't make it that much large if it does. Did uploading from the Supabase Storage UI work?
chovyfu
chovyfuOP4w ago
yes uploading from ui worked
silentworks
silentworks4w ago
Yeah I suspect the UI is using the resumable uploads endpoint rather than the normal one.
chovyfu
chovyfuOP4w ago
ok but the nomrla one says up to 5gb which is fine. i'm using quantum resistant encryption so it probably grew the file passed 50MB
silentworks
silentworks4w ago
Yeah it says that but recommends the resumable uploads one as a better option. I have no clue what this is.
chovyfu
chovyfuOP4w ago
yeah. down the road if i get users i'll try that. but this should work for now. i found the settings, thansk for you help the upload works in my app now!

Did you find this page helpful?