简体   繁体   中英

how to avoid shinyapp reloading

I currently try to set up a Shiny page with the fileInput and users are able to download after some simple manipulation of their own file.

Uploading large file sometimes takes more than one minute so page reload ( disconnect from the server ) would abrogate the file processing before users are able to download.

I put session$allowReconnect(TRUE) but re-connect won't keep the file of course. Does anyone have a solution to that? Thank you!

I'm assuming that the user being disconnected isn't a regular occurrence. If it is, you may have a bug in the code that generates the file for download.

You could write the file to disk as a first step and then poll whether the file exists to have the user download it. This may require each user has their own results folder where it gets saved or each file has a unique ID associated with the user to avoid cross contamination between users though, for example.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM