SupabaseS
Supabase6mo ago
msnook

Getting error 413 (file too large) on preview branch while seeding storage

My seeds process is working just fine locally, but for the preview branch, seeding fails when it gets to the storage bucket and its one small file. I've set up the bucket with this in my config:

[storage.buckets.avatars]
public = true
file_size_limit = "50MiB"
allowed_mime_types = ["image/png", "image/jpeg", "image/gif"]
objects_path = "./avatars"


And I've added the one image avatar that's required for my one seeded user. It is some 600 kb -- not too large! Again, it works fine locally.

But when I create the pull request and the Supabase integration tries to set up a preview branch, it goes through the process with migrations and seeds and then it gets to the storage part/seeding this file, I get this error:

Creating Storage bucket: avatars
2025/06/24 18:13:30 Error status 400: {"statusCode":"413","error":"Payload too large","message":"The object exceeded the maximum allowed size"}


And then that's the end of it. No more info to go on. I have checked the project settings and the preview database's settings, and in both places the limit is set to 5MB, so I can't see why it's failing to seed a single 600 kb file. Any help?
Was this page helpful?