thomasp85 / shinyFiles

A shiny extension for server side file access
195 stars 47 forks source link

shinyDirChoose does not work on shinyapps.io #190

Open chuyaowang opened 7 months ago

chuyaowang commented 7 months ago

Hi, I have an app using the following file structure:

- myApp/
    - app.R
    - www/
    - sampledata/
        - dataFolder/
            - data1
            - data2
            - data3

This is how I set up the shinyDirChoose button:

For the ui

shinyDirButton('datadir', label = "Choose Data Directory", title = "Please select data path", multiple = FALSE, width = "100%")

For the server

roots <- c(data = 'sampledata/')
shinyDirChoose(input, "datadir", roots = roots, allowDirCreate = F)

I want to deploy the app to shinyapps.io for a demo and stored some sample data in the dataFolder/. My app has a shinyDirButton to allow the user to choose their own folder containing their data for analysis, and for the demo, they should choose the dataFolder/ inside sampledata/, but the problem is nothing is shown in the file window when I click the button in shinyapps.io.

Here is what it looks like locally:

Screenshot 2024-01-23 at 01 41 41

Here is what it looks like on shinyapps.io:

Screenshot 2024-01-23 at 01 45 58

Please help me identify the problem. Is it a permission issue? The shinyapps.io log does not show any error messagešŸ˜¢. This is my repo for your reference: repo link

EkremBayar commented 3 months ago

@chuyaowang I have the same problem. Is there a solution?