The app basically get the uploaded file and saves it on the www/img
folder.
This app receive the jpg file and saves on www/img
folder
I can save the first one.
But when I upload the second it doesnt work anymore
library(shiny)
#File name:
# IMG_1805
ui <- fluidPage(
fileInput(
"file1",
"jpg image",
accept = c('image/jpeg', 'image/jpg')
))
server <- function(input, output, session) {
output$main_image <- renderUI({
req(input$file1)
file.copy(input$file1$datapath, "www/img/")
})
}
shinyApp(ui, server)