title: Uploading multiple files from shiny app to google drive
body: <p>Using the advice from this previous <a href="https://stackoverflow.com/questions/49063470/have-rshiny-app-user-upload-image-to-dropbox-shiny-server-google-drive">post</a> I was able to figure out how to upload a single file from my shiny app to a specific folder on my google drive. This worked perfectly. Unfortunately, I get the following error when I try to select and upload multiple files though. Any help is appreciated!
  &quot;Warning in if (!file.exists(media)) { :
  the condition has length &gt; 1 and only the first element will be used
  Warning: Error in rationalize_path_name: is_string(name) is not TRUE
  [No stack trace available]&quot;</p>
  <p>Here is minimally reproducible example below</p>
  <pre><code>library(googledrive)
  
  ui &lt;- fluidPage(
    fileInput(inputId = &quot;file&quot;, 
              label = &quot;Choose file to upload&quot;,
              accept = NULL, 
              multiple = TRUE)
  )
  
  server &lt;- function(input, output) {
  
    observeEvent(input$file, {
      drive_upload(media = input$file$datapath,
                   name = input$file$name,
                   path = &quot;my_folder&quot;)
    })
  }
  
  shinyApp(ui, server)
  </code></pre>