ShaneIsrael / fireshare

Self host your media and share with unique links
GNU General Public License v3.0
653 stars 40 forks source link

Is there a known workaround for setting Max Upload Size? #182

Closed WingZeroh closed 1 year ago

WingZeroh commented 1 year ago

Hello! I know that the Max Upload Size feature is on the enhancement list, however I wanted to see if anyone knew of a temporary solution/workaround to set a max upload limit (if it's possible).

I don't want people abusing 1 GB storage per video upload, for example.

Thanks

ShaneIsrael commented 1 year ago

As long as you have Fireshare behind a reverse proxy you should be able to set a max upload limit on whatever reverse proxy you are using. In the case of nginx, you simply need to set the client_max_body_size.

This article goes into a bit more detail on how to do it. https://www.tecmint.com/limit-file-upload-size-in-nginx/

Then if somebody tries to upload a file larger than what you allow, the connection would be severed once they go over the limit by nginx.