bookwyrm-social / bookwyrm

Social reading and reviewing, decentralized with ActivityPub
http://joinbookwyrm.com/
Other
2.17k stars 255 forks source link

I would like the max upload size to be configurable #3373

Open ruudschilders opened 3 weeks ago

ruudschilders commented 3 weeks ago

Is your feature request related to a problem? Please describe. A user wanted to import their .tar.gz file from another server, but the file was 40MB. The 'Import' button wouldn't work

Describe the solution you'd like The MAX_FILE_SIZE_BYTES is currently hard-coded in bookwyrm.js, it would be nice if it's configurable in the .env file

Describe alternatives you've considered I changed the value in bookwyrm,js but that will be overwritten at each update

Additional context I am running Bookwyrm (https://bookwyrm.world) in docker.

hughrun commented 3 weeks ago

Max upload size should be controlled by DATA_UPLOAD_MAX_MEMORY_SIZE in Django - which as of a recent change is controlled by an env setting of DATA_UPLOAD_MAX_MEMORY_MiB in BookWyrm to make it easier for admins.

I didn't realise we had another totally different custom setting in the JS file. This seems unnecessary - Django will reject an upload that's too big with an appropriate error (see #3121).

@mouse-reeve looks like you put this in with #1165 - do you remember why?