Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change 'Maximum upload size exceeded' restriction in Shiny and save user file inputs?

Tags:

r

shiny

I've recently learned that R Shiny programs impose a maximum size restriction for file uploads by default (I don't know what the size is exactly, but I'm guessing it's 5,000 KB). I'd like to remove this restriction. How can I do so, and what is there a general rule of thumb for the size of user uploads?

In addition, this is on another note, but related: how can I save fie inputs by the user BY session? For example, there would be a file prompt in the application, in which the user can upload a file. Then, when the user chooses the file to display, he can pick among the files he has uploaded. If he exits the session, the list clears.

like image 266
jeffrey Avatar asked Aug 03 '13 22:08

jeffrey


People also ask

How do I increase max upload size?

Open the file in any text editor and add the following code. @ini_set( 'upload_max_size' , '20M' ); @ini_set( 'post_max_size', '13M'); @ini_set( 'memory_limit', '15M' ); Save your changes, and it should increase your file upload size.

What is the max file size for R?

Under most 64-bit versions of Windows the limit for a 32-bit build of R is 4Gb: for the oldest ones it is 2Gb. The limit for a 64-bit build of R (imposed by the OS) is 8Tb.


1 Answers

Quoting Joe Cheng from this shiny-discuss post

By default, Shiny limits file uploads to 5MB per file. You can modify this limit by using the shiny.maxRequestSize option. For example, adding options(shiny.maxRequestSize=30*1024^2) to the top of server.R would increase the limit to 30MB.

like image 84
GSee Avatar answered Sep 27 '22 19:09

GSee