Steps to get multi upload working

To add multiple file upload, can we build it off of the single file upload documentation? Besides marking the multiple switch, is there anything else that needs to be done to activate the multiple file selection?

I posted this a few hours ago, which has some added info on multi upload too if you like

1 Like

It appears that I omitted the [] to the linked input field. My experience so far has shown the generators are faultless when creating a single file upload, however, they fail when creating a multiple file upload. Nevertheless, I’m sure the problem lies with my inexperience more so than the code generated by Wappler. :slightly_smiling_face:

Well I am glad you found the missing part that was causing the problem, that’s good news.
The auto generators do work with multi upload too but there is a bit of a particular order you need to work in or it thinks it’s a single uploader and not a multi.

I just ran a test and the results were positive with the files being uploaded. However the data failed to be inserted to the database.

When you have time…

What is the order in which I need to work so I can get the generated form upload and insert the data?

Teodor is about to create a multi upload tutorial, so in the meantime this is a screenshot of my multi upload form which might help more

Server Connect


1 Like

Did you make sure to use the name binding from the repeat step?

It appears our processes mirror one another. The only exception that I have is with my addition of a query of the logged in administrator (id, email) who is uploading the files, and the path of the image.

I can not see that step causing the issue to be honest.

So you are getting many files uploaded correctly that you can see on the server in the correct folder but the names are not being sent to the database.

Do you possibly have this live online somewhere, or have you gone through the debugging info in the console as hopefully it will give some indication where it is failing on the database insert step.

It’s usually one minor detail that lingers in the darkness that is just sitting there laughing at you!

I just located a FK what wasn’t being inserted. Just so happens it is set to NOT NULL.

Your console suggestion was the key!

haha, yeah i figured, it is always some silly tiny oversight somewhere, lol, story of my life.

1 Like

It’s those goofy little things that are so humiliating! I’m just glad I didn’t have a ‘live’ audience. Ha!

1 Like

If I may ask one more thing… is there any secret to the urlData view with multiple file uploads?

No problem. Sorry I am a little confused what you mean though can you explain further.

Sorry I miss-typed it! data url … you know when you select a file (in this case an image) to be uploaded, you can use data url to preview the image (see below).

With multiple uploaded files will I have to use a repeat to preview them? Crazy question, right?

To be honest I have no idea how you would go about showing a preview BEFORE the image is uploaded. I know it is possible because the dmx Drop zone extension used to do that but I have no clue how.

I just show the image as a thumbnail after it is uploaded and make it clickable to open in a light box.

Hopefully @Teodor will let us know.

Yeah, you can create a preview using the data url inside the file input. It’s a pretty cool feature.

I’ve already got the list no the left of the form.


Thanks, I will give it a try, never knew that before. If i get it right i will let you know how.

1 Like