title: Is it possible to change downloading behavior for large PNG files?
body: <p>In my Shiny app, I produce a plot that is quite heavy. When I want to download this plot, R first produces the PNG file in the background and then opens the file system to choose where I want to save it.</p>
  <p>The problem is that the plot creation takes some time after clicking on the download button, and therefore the user doesn't know if it worked.</p>
  <p>Example below: the plot is a bit heavy so it takes some time to appear. Wait for it to appear before clicking on the &quot;download&quot; button.</p>
  <pre><code>library(shiny)
  library(ggplot2)
  
  foo &lt;- data.frame(
    x = sample(seq(1, 20, by = 0.01), 5*1e5, replace = TRUE),
    y = sample(seq(1, 20, by = 0.01), 5*1e5, replace = TRUE)
  )
  
  ui &lt;- fluidPage(
    downloadButton('foo'),
    plotOutput(&quot;test&quot;)
  )
  
  server &lt;- function(input, output) {
    output$test &lt;- renderPlot(ggplot(foo, aes(x, y)) + geom_point())
    output$foo = downloadHandler(
      filename = 'test.png',
      content = function(file) {
        ggsave(file)
      }
    )
  }
  
  shinyApp(ui, server)
  </code></pre>
  <p>Is there a way to invert the process, i.e first let the user choose where to save the plot and then produce the PNG in the background? I think that would provide a better user experience.</p>