title: After uploading a file using the browse button in R shiny, the file's name is changed
body: <p>I'm having trouble uploading a file in R shiny. What I'm trying to do is, I use the browse button to select the file (file.csv) from folder A and upload it to folder B, but when I see folder B, the file name appears to be &quot;Bfile.csv&quot; after uploading. I'm not sure why the file is being renamed when I upload it.</p>
  <p>someone assist me how to solve this issue in R shiny</p>
  <p>Below is the code.</p>
  <pre><code>library(shiny)
  library(here)
  
  #path for folder B, where the file to be stored after uploading
  file_path&lt;- here('inputfolder/B')
  
  ui &lt;- shinyUI(fluidPage(
    
    sidebarLayout(
      sidebarPanel(
        fileInput('file1', 'Select file to upload' )  
      ),
      mainPanel(
        h4('List of uploaded files:')
        ,verbatimTextOutput('fileList')
      )
    ))
  )
  
  server &lt;- shinyServer(function(input, output) {
    
    observe({  
      if (is.null(input$file1) ) {    return(NULL)  }  
      file.copy(from = input$file1$datapath, to =  paste0(xptpath,input$file1$name )  ) 
    }) 
    
    
  })
  
  shinyApp(ui, server)
  
  </code></pre>