toolkit icon indicating copy to clipboard operation
toolkit copied to clipboard

Max Upload File Size

Open aleisha1112 opened this issue 3 years ago • 3 comments

I'm using Overleaf Toolkit and need to adjust the max upload file size. For more complicated documents where figures and include files are stored in directories for better organization, uploading a zip file is the most efficient way to get the project into overleaf, but the zip file for some projects is > 50 MB. I have seen steps where you can modify client_max_body_size in /etc/nginx/nginx.conf within the container, but when I bring the container back up, the changes aren't having any effect.

Here are the steps I am taking

  1. Use bin/up -d to bring up overleaf
  2. Get a shell into the container: bin/docker-compose exec sharelatex /bin/sh
  3. Edit client_max_body_size in nginx.conf: vim /etc/nginx/nginx.conf
  4. Exit the shell
  5. docker commit sharelatex sharelatex/sharelatex:with-texlive-full (also using the commit to keep all tex packages)
  6. bin/stop
  7. Add docker-compose.override.yml to overleaf-toolkit/config with
version: '2.2'
services:

    sharelatex:
        image: sharelatex/sharelatex:with-texlive-full
  1. bin/up -d
  2. Get a shell into the container: bin/docker-compose exec sharelatex /bin/sh
  3. View /etc/nginx/nginx.conf and I see that client_max_body_size is back to the original setting of 50m

I expected the change to be saved in the image. It did start back up with all of the tex packages so I know it's using the right image. Is there somewhere else that I should be making this change? Or is this not something I can customize?

It seems that if I am hosting overleaf on my own server, I should be able to have more control over settings like max file size and max number of files uploaded based on what I think my server can handle.

aleisha1112 avatar Aug 05 '22 14:08 aleisha1112

Update: I did find that if I edit client_max_body_size in /etc/nginx/templates/nginx.conf.templates, do the docker commit and restart the container, nginx.conf has the updates. But I still am unable to upload larger files.

aleisha1112 avatar Aug 05 '22 15:08 aleisha1112

I just leave a comment to share a method that I have found to increase the upload limit. After modifying the client_max_body_size in /etc/nginx/templates/nginx.conf.templates as you mentioned above; I edited /overleaf/services/web/config/settings.defaults.js as below: maxUploadSize: 50 * 1024 * 1024 * 1024, // 50 GB

kmbae avatar Nov 08 '23 08:11 kmbae