Skip to main content

How do you pre-populate a FilePicker?

Comments

2 comments

  • Berend Veldkamp
    The contents of the native HTML file input cannot be set in code, as it would allow a site to pre-fill it with for instance c:\windows\passwords (or some other sensitive file). A casual user might inadvertently upload a file in this way.

     

    What you could do is use Runtime Modifications to add the filename to a Group Description, or use a Markdown, e.g. ‘File(s) already selected: SomeFile.txt’.
    0
  • Zack Robison
    Thanks Berend, I actually had things set up just like this for a bit there.  I was completing the upload/deletion process and then providing a list to the user when the form reloads.  We figured that this was a bit confusing, since the rest of the form doesn't work that way, so we split the forms in two anyway.  I figured that this "limitation" was actually a security feature, but was hopeful to discover otherwise!
    0

Please sign in to leave a comment.