File upload dialog using code

I would like my users to be able to run the code, and be prompted with the file upload dialog so they can upload a local file.
My code will then check if the uploaded files correspond to format expected and will execute data processing.

Any ideas how I could do that?

P.S.: I'm still trying to convince my people to get onboard with this, and it is a temporary solution. If I can't do that I'll just ask users to upload the files using the upload utility and specify where they should put the files on the server.

One way to do this would be to use selectFile function in the rstudioapi package. You can set the path to the folder where the files reside and also specify glob filter to scope for files with a certain extension.

rstudioapi::selectFile(path = "path/to/folder/with/data", 
                       filter = "*.csv") # Will show only .csv files

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.