RStudio Connect + Rmarkdown: Maximum Upload Size Exceeded

Hi,

I want to create a rmarkdown report with RStudio connect. The report relies on several excel files.
The end user should be able to upload these excel files.

In my yaml header, I've included the files as follows:

params:
  test_data: 
    input: file
    value: "data.xlsx"

In RStudio Connect I get the possibility to upload these files.
But when uploading the files i always receive the following error:
"Maximum upload size exceeded"

I know that in a shiny app, I can avoid this error by increasing the following option:

options(shiny.maxRequestSize = ....)

Is there a possibility to set a similar option when deploying a rmarkdown report?

Thank you very much for your help!

1 Like

There is an option getOption("rsconnect.max.bundle.size"). By default it is set to

options(rsconnect.max.bundle.size = 3145728000)

Should have this after loading rsconnect :package:. You could change this option to increase the maximum.

2 Likes

I think the problem is not the rsconnect.max.bundle.size. Even small files (like >=5MB) cause this error. I would like to tell rsconnect, that it should use the shiny option mentioned above.

Thanks for reporting! I have reproduced this on my end and think the default (5MB, as explained here ) is being used in this case.

I will try to figure out if I can find a workaround!

1 Like

Apologies for the delayed response here. File Inputs to Parameterized R Markdown reports are not very customizable today, and unfortunately there is no way to set the option in question for the selector made available in the Connect UI. I have opened an issue internally for tracking. At present the only workarounds I can come up with are:

  • use a Shiny application or Shiny document (R Markdown document with a Shiny runtime).
  • save the files onto an internal webserver or share drive, and have a text input for a filepath or URL. R code would then be required to "go get" the file and pull it into Connect when rendering.
2 Likes