title: Upload and viewer PDF Shiny error - Not Found
body: <p>I want to user to upload pdf file and then view it - including basic functions like zoom in and zoom out.</p>
  
  <p>But I am getting error</p>
  
  <pre class="lang-r prettyprint-override"><code>ui &lt;- shinyUI(fluidPage(    
      titlePanel("Testing File upload"),    
      sidebarLayout(
          sidebarPanel(
              fileInput('file_input', 'upload file ( . pdf format only)', accept = c('.pdf'))
          ),        
          mainPanel(
              uiOutput("pdfview")
          )
      )
  ))
  
  server &lt;- shinyServer(function(input, output) {    
      observe({
          req(input$file_input)
  
          #test_file &lt;- readBin(input$file_input$datapath, what="raw")         
          #writeBin(test_file, "myreport.pdf")        
          #cat(input$file_input$datapath)        
  
          file.copy(input$file_input$datapath,"www", overwrite = T)
          output$pdfview &lt;- renderUI({
              tags$iframe(style="height:600px; width:100%", src="0.pdf")
          })        
      })    
  })
  </code></pre>
  
  <p>I am getting: <code>bot found error in viewer. "Not Found"</code> </p>