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

Make object upload size limit configurable #16

Closed inian closed 2 years ago

inian commented 3 years ago

Right now, this is configured on server startup and is set to 50 MB on the Supabase hosted platform. We will need a way to expose this to users.

alanbar commented 3 years ago

It would be nice to restrict files to a certain size for conformity on reports etc Or is there software available to do this in the browser?

inian commented 3 years ago

You can do this in the browser via JavaScript @alanbar. Here are a few ways in which you can do it.

heauton commented 3 years ago

Just to be clear, when using js library https://supabase.io/docs/guides/storage#upload-a-file I can't upload more than 50mb. Is this correct? Is there a workaround to increase upload size for now? @inian

inian commented 3 years ago

Hi @heauton,

I can't upload more than 50mb.

yup thats right

Is there a workaround to increase upload size for now

Reach out to beta@supabase.io if you want to increase it for your project. If you are self hosting, change this value and restart the server.

I am keeping this issue open to track doing this from the dashboard

thebengeu commented 2 years ago

Resolved with supabase/supabase#5597, #75 and #76.

MMTE commented 6 months ago

I'm investigating this option on self-hosted versions? how could we change environment a max file size of e.g 500 MB?

kutovoy commented 6 months ago

i have same issue "Failed to upload fire_alarm.mov: The object exceeded the maximum allowed size", changing "FILE_SIZE_LIMIT" to let's say 1073741824 and restarting docker compose doesn't help

MMTE commented 6 months ago

i have same issue "Failed to upload fire_alarm.mov @kutovoy mine got fixed. I had a lot of database unhealthy messages. I sort of cleaned all containers and volumes and just backed up my migrations and then started again. I wrote the limit in this format file_size_limit = "5000MiB" finally I uploaded a large file successfully.

kutovoy commented 4 months ago

thanks MMTE! I did few more attempts and figured out that I had to edit the docker-compose.yml file instead of editing docker/.env since the ENV var had to be passed into the storage container. So the correct setting in the docker-compose.yml (for local docker installation) is services.storage.environment.FILE_SIZE_LIMIT and it's finally working for me

MMTE commented 4 months ago

thanks MMTE! I did few more attempts

Glad to hear.