downloadHandler not working with shinyapps.io

676 views
Skip to first unread message

Thomas Lin Pedersen

unread,
Dec 8, 2014, 9:41:20 AM12/8/14
to shiny-...@googlegroups.com
I have a shiny app hosted at ShinyApps.io which works fine when running locally, but have trouble with downloadHandler functionality on the shinyapps.io side. When I click on the link I get a Not Found error.

An example of a downloadHandler that is to working properly is: 

    output$exampleDownload <- downloadHandler(
        filename = 'Pangenome.csv',
        content = function(file) {
            exampleFile <- system.file('extdata', 'exampleData.csv', package = 'PanVizGenerator')
            file.copy(from=exampleFile, to=file)
        }
    )

As you can see it is not rocket science going on within the function...

The app is hosted on https://thomas.shinyapps.io/PanVizGenerator/ and is based on the server.R file residing in the thomasp85/PanVizGenerator GitHub repository. I would be happy to receive any pointers for my troubleshooting.

best

Thomas

Thomas Lin Pedersen

unread,
Dec 8, 2014, 11:34:09 AM12/8/14
to shiny-...@googlegroups.com
After testing it (on OS X) - the problem does not occur in Chrome, but in Safari and Firefox. The fact that it is browser specific is even more baffling (Safari and Firefox works fine when running local)...

Winston Chang

unread,
Dec 12, 2014, 6:05:58 PM12/12/14
to Thomas Lin Pedersen, shiny-discuss
It works fine for me in Chrome and Firefox. Is it still a problem for you?

-Winston

--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/9d887cfe-73e9-4146-a6fb-a938254551c2%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Thomas Dybdal Pedersen

unread,
Dec 13, 2014, 5:26:12 AM12/13/14
to Winston Chang, shiny-discuss
I've been in direct contact with Andy about this and forgot to post an update. The problem related to a custom html file where the download link missed the target="_blank" attribute, which messes things up in certain browsers.

/Thomas

Mathilde Bateson

unread,
Dec 18, 2014, 10:58:09 AM12/18/14
to shiny-...@googlegroups.com, win...@rstudio.com
Hello 

I have the same problem with my app hosted at ShinyApps.io...

 My DownloadHandler also works fine locally, works with Chrome but not with Safari of Firefox
I didn't understand Thomas' response... Is there a workaround so that it it works on all 3 browsers ?

Thanks !

Andy Kipp

unread,
Dec 18, 2014, 11:08:43 AM12/18/14
to Mathilde Bateson, shiny-discuss, Winston Chang
Mathilde,

Which link is not working?

-Andy

Reply all
Reply to author
Forward
0 new messages