Understanding tmp file management in Shiny

Hello,

I am new to Shiny and trying to understand how Shiny apps manage uploaded files and data, and whether or not these tmp files are automatically deleted after a user ends their session. I've been searching around quite a bit and found several links that I can't post because I'm a new user that provide partial answers to my query, but I'm failing to find a definitive answer.

My question stems from an app I am developing. Essentially, the main functionality is to have a user upload a .csv of item-level data (questions asked during a survey about child development) and to score that data using a package I wrote.

Our concern is that, despite warnings that ask users to de-identify their data prior to upload, users may upload data that contains personally identifiable information.

So my questions are:

  1. Where exactly are tmp files and objects being stored? I added a line of code to display the $filepath object to try and understand this, and locally it's quite clear (as shown in the 1st screenshot) that a temp folder is being written to my AppData file.


    When I deployed the app on shiny.io, I get a similar string (e.g. "/tmp/RtmpiUBWgK/6ba10244138df782dff84329/0.csv
    "), but I am unsure how to interpret this or where the parent directory is being hosted. I am assuming that this somewhere on the shiny.io server, but don't really understand it.

  2. Regardless of exactly where the files are hosted, I am a bit confused when temporary files get deleted? Is this whenever a user ends their session? Or is it only when the application is restarted? The tmp files are definitely deleted when I reload the app locally, but I am not sure how this behavior changes when a user ends their session or the app goes to sleep.

I've tried to do my due diligence to investigate these questions on my own and apologize if I've missed anything very obvious.

Thank you!

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.