strategicsdemexico's avatar

Dropzone.. Don't sen't the request until save button is clicked

I'm using the Dropzone plugin, this is the idea I have a Post that can store many photos.... but this is the issue, I have a form with the title of the post and the body and in the same post I have the dropzone, so I can't send the request to store the photos until I have the Post stored in the database, so in this way i can assign the $post->id to the photo_id field on the post_photos table, I know I could make two pages, and create the post and next page upload the pictures, but the client want to have like tabs in the design, so the first tab has the title and body second tab it's the photos... so we drop the photos and we don't upload them until we send all form with the title and body... you get me guys?

0 likes
1 reply
strategicsdemexico's avatar
Level 2

Fixed using

autoProcessQueue: false

And when I click on save post I send a ajax post request to save the post when this is done with success i trigger the method..

this.photosZone.processQueue();

Pretty basic stuff @JeffreyWay said! haha

Please or to participate in this conversation.