Shiny fileInput Does Not Keep File Name
<p>I am writing a program in Shiny where the user uploads a file and it saves to a specified folder. The method to do this is taken from <a href="https://stackoverflow.com/questions/31966924/shiny-app-file-upload-how-can-we-save-the-files-uploaded-on-a-shiny-gui-to-a-pa">this question's answer</a>. </p>

<pre><code>library(shiny)

shinyApp(
    ui=shinyUI(bootstrapPage(
       fileInput("upload", "Upload", multiple = FALSE)
    )),

    server=shinyServer(function(input, output, session){               
        observe({
            if (is.null(input$upload)) return()
            file.copy(input$upload$datapath, "/some/other/path")
        })
    })
)
</code></pre>

<p>When I execute this, I find that the file has its file name stripped when it is saved to the specified folder. The program that reads the files in the folder requires that the file name is left in tact. How can I accomplish that?</p>