Does anyone know if you can upload multiple files in file uploader?
Put a file loader component on your form and look at its properties pane. Thereâs a checkbox there for allowing multiple files.
If your file loader widget is called file_loader_1, the you can access list of uploaded files with self.file_loader_1.files
. So, do something like this in the method that handles the file loader change event:
def file_loader_1_change(self, file, **event_args):
for fl in self.file_loader_1.files:
app_tables.images.add_row(image=fl)
Thanks for the suggestions. What I am looking for is uploading files sequentially and there a panel showing the files uploaded and give user the option to delete or keep before submitting
If I understand what you hope to do, thatâs fairly simple functionality to build - just add a repeating panel which displays each file as it gets uploaded in the âforâ loop. Add a button in each row of the repeating panel to optionally delete any uploaded file from the database (although Iâm not clear on why youâd want to delete a file youâve just selected to upload).
Whatever custom functionality you want to implement, youâre going to need to compose it by looping through files selected with a file loader widget. Take a look at:
When building the template for repeating panels, what element do you suggest for displaying the file image? I tried image but it does not display on front end
This really doesnât match your topic title âUploading multiple filesâ. To draw attention to the new question, from the appropriate forum members, I suggest starting a new topic, with a new, appropriate title.
Thanks for suggesting this example. But is there a way to show the image of the file uploaded if the file is a word document or pdf?
There are other posts in the forum discussing viewing of other types of files. e.g. for Word documents: Word Document Viewer
Thank you. I ended up settling with showing the file name using repeating panels. I think showing the word as an attachment image requires more javascript work.