I want to create an input file dialog. This is straightforward using the fileInput
function.
shinyUI(pageWithSidebar(
headerPanel(""),
sidebarPanel(
fileInput("file", "Select a file")
),
mainPanel()
))
After uploading it looks like this:
Now, I want to reset the inputFile
element to the state it had before uploading. As there is no such function like updateFileInput
, me being a JS/HTML rookie, I am not able to figure out how I could achieve that. The code output from fileInput("file", "Select a file")
is the following.
<label>Select a file</label>
<input id="file" type="file" accept="text/plain"/>
<div id="file_progress" class="progress progress-striped active shiny-file-input-progress">
<div class="bar"></div>
<label></label>
</div>
Any ideas?
PS. I do not want to use a reactive renderUI
here to re-render the file input element. I'd rather want to go the 'update way' (if there is such a thing) ...