title: How to download plots made in a shiny app(in a jpeg /png format )
body: <p>I'm trying to figure out how to use downloadButton to download a plot with shiny. The example in the package demonstrates downloadButton/downloadHandler to save a .pdf. I'm going to make a reproducible example based on that.</p>
  
  <pre><code>    output$downloadPlot &lt;- downloadHandler(
      filename = function() {
          "plotname .pdf"
      },
  
      content = function(file) {
          pdf(file = file,
                  width = 12,
                  height = 12)
          print(buildPlot())
          dev.off()
      }
  )       
  </code></pre>