Quantcast
Viewing all articles
Browse latest Browse all 5991

R Shiny server on Ubuntu disconnects with server after upload file more than maximum upload size(5MB)

I have installed shiny server in Ubuntu 16.04.2 which I run locally. The problem that I am having is; when try to upload a data file (CSV) that more than 5MB, it accepts the file and uploads it, however, after 1 or 2 seconds (I guess when it executes the reading function in server.R) it disconnects from the server.

This is the code which allow to upload file more then 5MB. I wrote this code into global.R file.

 if(Sys.getenv('SHINY_PORT') != "") { options(shiny.maxRequestSize=10000*1024^2) }

I have also tried :

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

And here my reading function for data file in server.R

  Dataset <- reactive({  if (is.null(input$data1)) {  # User has not uploaded a file yet  return(data.frame())  }  inFile <- input$data1  Dataset <- as.data.frame(do.call( "read.csv", args =   list(inFile$datapath,                                          header = input$header,                                          sep    =  input$sep,                                           quote =  input$quote  )))  })

Thank you


Viewing all articles
Browse latest Browse all 5991

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>