I just (almost) completed my first shiny app after trying some other approaches, only to come to the end and discover a big problem (after spending week on this). I'm hoping there is a workaround and this can be salvaged. I have a somewhat specific question that will maybe get me over the finish line if there is a solution, and a more general question about my approach.
First, the app is intended to "look at" multiple files that user selects and produce a control grid of checkboxes and radio buttons for each file that are initialized using the file information, but that the user can override. I also do some reactive plotting, but that is somewhat besides the point. I'm using the basic fileInput() control to load files. The goal here is to generate two things: 1) a quarto produced HTML and 2) a new file which is created from the other files (it's an averaging process). I intended to do these outside of shiny in a separate quarto document. To communicate between the shiny app and the quarto I save the file names, paths, and control array values from the app into a file, with the intention that the quarto file will begin by reading these. My problem is that I did not realize that shiny will only save the temporary file paths. This causes two issues, I do not know in the quarto document where to open these files and I do not have the default path to save the new file. I could get around the first by accessing the temp folder, but these disappear as soon as the app is closed. Note that this app will only ever be run on local machines (so server is the machine). From my reading I understand to a degree that this use of temp directories is intended as a security measure for when apps are hosted on servers. So given all that: is there a way to salvage this and be able to write the actual file paths out of the app?
My more general question is: should I have used shiny for this in the first place? Although I take advantage of the reactivity for plotting, it's not necessary. My goal starting out was to build all this into a single quarto document that would 1) have the user load files, 2) create (cased on number of files selected) a gui with the file controls, 3) create the html and new file after the user indicates they have finished updating control. I ended up with shiny because I couldn't figure out a better way to build the ui.