Is it possible to add a file into the File Input component without manually selecting a file?

I had another question similar to this one, but I felt like this could deserve its own thread.

The title sums up the question. I have a file saved locally and I would like to find a way to dynamically add it to the File Input component.

The details of the file that I have in the app include:

  • the base64Binary of the file
  • the name of the file
  • the type of the file

This is a screenshot of the component.

If this is possible for the File Dropzone component or the File Button component I believe that would also work, but ideally, I would like to use the File Input component.

Hey @David57940!

It doesn't look to me like this is possible at the moment. You might try using a transformer that conditionally returns either the value selected via the component or the value you're programmatically selecting. Then, if you want to display the name of the programmatically selected file, you can try dynamically setting the placeholder text on the input:

I'm curious to hear more about what your use case for this is though! Maybe there's a workaround that gets closer to what you're looking to do :thinking: