Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

future wrapper does not work with download button #44

Open
nvshah286 opened this issue Mar 14, 2019 · 1 comment
Open

future wrapper does not work with download button #44

nvshah286 opened this issue Mar 14, 2019 · 1 comment

Comments

@nvshah286
Copy link

nvshah286 commented Mar 14, 2019

I am trying to do async for a download button my shiny app. The file download takes 8-10 seconds so i want to run it in background and make the app available for the users in that time.

I wrapped the download function with future . But it does not work as expected.

script :

output$Report <-
shiny::downloadHandler(

  filename = function(){
    fileName
  },
  content = function(file) {
     params = list(origin =input$Origin,
                   destination = input$Destination)
     # knit the document 
     observe(print(params))
     observe(head(flightsData))
     
     future({
       downloadPpt(fileName = fileName, inputParams = params)
       file.copy(file.path(filePath,fileName),file)
     })

  }   
  
)
@king-of-poppk
Copy link

This issue belongs to Shiny, not promises.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants