Hi!
I've developed a simple Shiny app, where the first step for the user is to load a JSON file with a fileInput gadget.
In the UI the code, it is something like this:
fileInput("file1", "Chose JSON file",
multiple = FALSE,
accept = c(".json",
"application/json",
"text/comma-separated-values,text/plain",
".csv"))
In the Server side, it goes like this:
observeEvent(input$file1,{
variables$data = read_json(input$file1$datapath, simplifyVector = TRUE)
output$message1 <- renderText({
"Loaded file"
})
})
When I run the app locally, it works perfectly (although I have to set a shiny.maxRequestSize higher due to usually high JSON sizes). However, once I deploy the app to shinyapps.io, the loading of a JSON file doesn't work anymore. The loading bar keeps moving, and doesn't stop with the message "Upload complete" as it does locally.
Do you have any idea why this is happening? I've even tried to change the file extension of a JSON file to a CSV one trying to do the trick, but it didn't work either.
Any suggestion will be really helpful. Thanks in advance!