twg_'s avatar
Level 6

Dropzone.js and Laravel 5

Okay, I'm very new to Laravel and Dropzone.js. I made this small project to help myself learn but I'm to the point of pulling out my hear.

I have a form that has a title, description, and dropzone input fields. I need to take the form fields and write the title and description to the post table and then get the id from the post just uploaded and then upload my images and write their data to the post_images table referencing the post id that was just created.

Can anyone help me here? I have no clue where to go after creating the form and then adding dropzone to it.

0 likes
1 reply
bm2ilabs's avatar

Hello , i had the same issue before , i make it work with this u can embed the formdata that has been send other than dropzone with the request

something like

self.on('sending', function (file, xhr, formdata) {
                        formdata.append('title', $('#title').val());
                        formdata.append('description', $('#description').val());

don't forget to add the url to the dropzone request . i hope this will help

Please or to participate in this conversation.