payload size too large
How do I update supabase to allow large payloads of up to 2GB?
44 Replies
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.
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.
its for uploading a file
the file is 23MB
If you are uploading a file larger than 6mb you need to use resumable uploads instead.
oh ffs. how do i do that?
I interpreted that as a recommendation. You don't think in this case it is a matter of limitation on the storage bucket?
"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.

This could be the case too since I've uploaded larger than 2mb files using the UI before.
i have that set to 2GB
i still can't upload
Try uploading in the UI itself and see if you face the same issue.
all i see is: Global file size limit
Restrict the size of files uploaded across all buckets. Learn more.
Although I suspect the UI is using the resumable upload endpoint.
where do i do that?
Where do you do what?
upload in ui
wait i don't have a bucket created. how are files working now?
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.
i think its storing the data in db
If you are using the storage upload API it stores in a bucket, not the db.
can you tell from that curl if its using storage upload api?
https://xxxx.supabase.co/storage/v1 that's the storage endpoint
Database REST endpoint would be https://xxxx.supabase.co/rest/v1so how is storage API saving files to db then?
Storage API doesn't save files in db, it saves the path and metadata in db.
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?
But there isn't any files stored according to your message as it's saying its too large.
The
https://xxx.supabase.co/storage/v1/object/sign/bucket-name/private_folder/prefix endpoint is used for generating signed URLs. I just checked.no i have other files that worked.
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.
but there are i see them in my UI
Which UI? the Supabase Dashboard? I though you said there were no buckets there?
damn. you're right
i was looking at wrong project
It happens to the best of us
i f ound it!
it was set to 50MB but my file is only 23MB
maybe it grows when i encrypt it though. idk
Encrypting it shouldn't make it that much large if it does.
Did uploading from the Supabase Storage UI work?
yes uploading from ui worked
Yeah I suspect the UI is using the resumable uploads endpoint rather than the normal one.
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
Yeah it says that but recommends the resumable uploads one as a better option.
I have no clue what this is.
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!
