Hi,
I am reposting this issue from here, here and here as it has currently 5 years since the issue was first reported, the bug is still present and the most recent post is not being answered to anymore.
In short, whenever the data:input:file parameter is used in a parameterized report that is published on Posit Connect, the report crashes with error ! '/opt/rstudio-connect/mnt/tmp/RtmpnmvlZN/file493ae4b2f59d3/0.csv' does not exist.
. This makes the parameterized reports functionality near useless, whereas otherwise it would be an amazing addition to our infrastructure.
Is there any timeline available when this issue is to be resolved?
My reprex:
---
title: "Parameterized Report"
author: "Your Name"
date: "`r Sys.Date()`"
output: html_document
params:
cylinders: 4
analysis_type: "histogram"
data:
label: "Csv file"
value: "cars.csv"
input: file
---
```{r setup, include=FALSE}
# Load necessary libraries
library(dplyr)
library(ggplot2)
# Load the dataset specified by the parameter
data <- readr::read_csv(params$data)
# Filter data based on the parameter for the number of cylinders
filtered_data <- data %>% filter(cyl == params$cylinders)
```
```{r}
head(filtered_data)
```
```{r}
if (params$analysis_type == "summary") {
summary(filtered_data)
} else if (params$analysis_type == "histogram") {
ggplot(filtered_data, aes(x = mpg)) +
geom_histogram(binwidth = 2) +
ggtitle(paste("Distribution of MPG for", params$cylinders, "Cylinders"))
}
```
Note that this does work locally, and the report will initially publish, but when uploading mtcars (exported as cars.csv) manually and running the report we observe the bug.