Is it possible to get the name of a file that was loaded into a file input form template?
I tried using the image command on radzen, but it is protected. The only way I found the name of this file was with this code, would it have another way?
Unfortunately this is not supported at the moment. We will introduce a new event of the FileInput component that will provide the file the user has chosen (filename and all). Then you will be able to use a Set property action and store the filename in a page property.
I had the same question about storing the file name. Glad to know I wasn't the only one. How do you download a copy of the file that was attached? I can do this with a save as on a photo but for PDF/Excel files I can upload but I can't get them back out. Also if there a way to handle multiple files with this control?
The FileInput component is meant to be used as a part of a form and stores the selected file as a property (column) in the entity (table) which the form is editing. This is the reason it accepts only one file - a table row can have only one value for a column. Downloading the uploaded file isn't something that Radzen provides out of the box. Still I think one can create a custom controller which reads the file from the database and streams it back to the user.
The Upload component on the other hand allows you to select multiple files and store them the way you want - in the file system, in the database etc.
The key here is that FileInput does not replace Upload - it is a way to automatically store files as part of form submission (without requiring custom file storage logic).