I need to let the users upload multiple text files with data and save them to a temporary directory. Then I want to batch process all the text files in that temporary directory. Can anyone help me create this temporary directory and get the path to this temporary directory so that I can submit the directory address/name to a function that will then batch process all files in that directory? This is needed for a shiny app. I also want to host this app on shinyapps.io.
Snippets from ui.r fileInput( "data", "Choose Monitor Files", multiple = TRUE, accept = c("text/csv","text/comma-separated-values,text/plain",".csv"))
Snippets from server.r metadata_proc <- link_dam_metadata(metadata, result_dir = getwd())
the function link_dam_metadata attaches the metadata to respective files in the folder (by getwd()).
So all files uploaded to the app by the user will be always stored in mytempdir and I can access those files from mytempdir? Or do I have to transfer the files to mytempdir separately? In that case, how to do so? file.copy?