Uploading large files fails

Hello,

I typically need to upload files upwards of 100 MB in size. In shiny, this can be enabled using

options(shiny.maxRequestSize=100*1024^2)

This works well when running my app on shiny server or directly in the container I use in shinyproxy. However, when running the app through shinyproxy, the upload stops immediately when trying files around 10 MB.

I don’t get any error messages anywhere (browser, R log, or shinyproxy.log).

Is there an additional file size limitation in shinyproxy that I need to adjust?

Many thanks,
Anders

Hi @Anders,

Do you make user of a proxy e.g. nginx in between you and ShinyProxy? If yes, these may have maximum default sizes (e.g. client_max_body_size) that are too small for your purposes.

If not I would try to set the below values (in your application.yml file) and restart ShinyProxy:

spring:
  servlet:
    multipart:
      max-file-size: 200MB
      max-request-size: 200MB

The defaults are

spring.servlet.multipart.max-file-size=1MB # Max file size. Values can use the suffixes "MB" or "KB" to indicate megabytes or kilobytes, respectively.
spring.servlet.multipart.max-request-size=10MB # Max request size. Values can use the suffixes "MB" or "KB" to indicate megabytes or kilobytes, respectively.

as can be seen here:

https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html

HTH,
Tobias

1 Like

@tverbeke, I don’t use a proxy - so setting those values in the .yml did the trick! Thank you so much for your help, I really appreciate it!

1 Like

You’re welcome, @Anders - thanks for the confirmation. This is now documented on the ShinyProxy website: https://www.shinyproxy.io/configuration/#uploading-large-files

Best,
Tobias