Skip to content
Advertisement

multiple dropzone upload on 1 single line mysql

I’m trying to upload multiple files at the same time and insert the file paths on 1 single mysql line per upload, but this adds one line per file.

Looks to me like my js dropzone setup is good but it doesn’t work on a single line but it adds one line per file in the database

Thank you for your help. (excuse me but i’m French)

My js:

JavaScript

My php with my html:

JavaScript

Advertisement

Answer

Looks to me like my js dropzone setup is good but it doesn’t work on a single line but it adds one line per file in the database

YES as @ADyson already commented THIS IS THE WAY IT SHOULD BE! 😉

The PHP file is CALLED ONCE PER FILE from Dropzone!

So if you have 5 files Dropzone will call the PHP file 5 times and each time hand over the file data.. and of course the php file will create a database entry each time.

BUT there IS a solution to change this: How to upload multiple files using dropzone.js?

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement