I'm having the same issue as @Rodrigue. When I deploy this minimal reprex together with cars.csv it renders correctly at first.
---
title: "RStudio Connect fileInput widget is still broken"
output: html_document
params:
filename:
label: "Upload a file"
value: cars.csv
input: file
---
readr::read_csv(params$file)
But when I select any file through the fileInput widget and knit the report, I get the following error:
07/20 19:53:02.975
Error: '/opt/rstudio-connect/mnt/tmp/RtmphCPGPu/file1c132df61ed9/0.csv' does not exist.
I checked the permissions of /opt/rstudio-connect/mnt/tmp/, and they are correct. I'm running RStudio Connect version 1.7.8-7 (build 1144ac9) with R 4.0.2 on RHEL 7.7.
I would rather not have to re-write my parameterized reports as Shiny apps to fix this. I work with medical technologists who are comfortable with uploading an Excel file in a web form but not with uploading it somewhere that's accessible via a pin.
So sorry for the trouble here. Unfortunately, I believe that this is still broken and does not have a solution yet.
Did any of the workarounds or solutions proposed here seem amenable to you?
In particular, my latest meanderings lead me to imagine a workflow like the following:
upload file to Shiny app
Shiny app pins the file
Shiny app renders an Rmd pointing to this pin
Shiny app redirects user to the rendered Rmd
There are some tricky bits of this workflow (namely, how to get the Rmd to point at the pin, how to give the user access to the report, etc.), but I am inclined to try a little prototype if that workflow would be helpful!
Hi @cole! Thanks for your response. I would be happy to try out a prototype of the workflow you are imagining. Could you build it and share here?
Although on the other hand, I think, it would be great if the RStudio Connect Dev Team could fix this issue since it apparently affects a number of their customers.
Hi @cole, just wanted to follow up on the Shiny -> pin -> parametrized Rmd workflow prototype. Anything you need from me to move forward?
Thanks!
Stephan
Not at all! I started a little prototype, but I wouldn't call it functional yet Hoping to have something sharable soon! One of the tricky problems is "what you do to organize the pins, reports, etc."
Hi @cole - I would like to follow-up on this workflow as well. My use-case is very comparable to Rodrigue (Parametized Rmarkdown with fileinput on Rstudio Connect New - #2 by cole) and skadauke in this thread: I want to be able to render a parametrized R markdown report that uses a file as input on Rstudio connect. Knit with parameters works perfectly on my local machine, but I get the same error as Rodrigue had on rstudio connect - the temp file appears to be virtually immediately destroyed (my first code chunck is supposed to read it - and errors when I try). I will experiment myself a bit with the building a shiny app as a pin uploader as you suggested, but any pointers would be welcome.
Finally, I was wondering: would you know if it is on the roadmap of RStudio to make the file input type (Shiny's fileInput) functional for parameterized R markdown files on RStudio connect?
@FMKerckhof Unfortunately there is still no better option today short of building a Shiny App yourself
We are throwing around some ideas to refactor how Parameterized RMarkdown works in order to make things like file inputs work, and to make Parameterized Rmd more extensible in general. However, it is unfortunately too early to say anything about how that is going to go and if/when it will be available.
What I can do is definitely pass this feedback along, though!! We love hearing from our customers and use this type of feedback in feature prioritization and development!
That said, I will share the experiment that I started... it has not been touched since my last message or thereabouts (my wife and I had a baby the next week haha). Also, a lot has changed in Connect since then, so it's possible that some of this doesn't work any more. I probably won't have any time to revisit any time particularly soon, though, so please let me know if you have any thoughts! Apologies for the rough edges / bleeding edge If you simplify some of the assumptions, it will probably make your life maintaining the report easier I would love to see what you come up with, if possible!
Thanks @cole , this is most helpful. And congrats on becoming a parent! I will keep you posted on my trials to make this work - I'll just fork your repo and if I have something that works I may send you a PR (as an FYI). Thanks as well to pass the feedback along. Our team is becoming a group of avid RStudio connect users, and we look very much forward to future developments. It will also take some time for me to look further at this - my current focus is on Plumber API's, but I'll definitely follow up on this in the coming months.
Hi,
is there any update on the development of the file input feature in RMarkdown on RSConnect? We are still having the "file not found" issue. There are some reasons why we prefer an Rmd-solution over a shinyapp (for example the schedule option to name one), which is why we are hoping for progress in this case. Is @cole still involved with this?
The file input works locally where a temporary directory is creatred and accessed, but on the server, the file or directory cannot be found.
Hi,
is there any update ?
fileInput is totally useless without this working. I saw a first request in 2019, is it planned to solve this issue ? @cole ?
Many thanks!
Aurélie
We are also facing this issue in Post Connect (v2023.05.0). It really devalues the parameterized reports functionality. Seeing how this issue is currently 5 years old, I would expect this issue to be fixed by now, is there any timeline available?