Okay, So i want two dropzones with different names in one form, the $request->all()
gives me just a token.
What i have done :
<form action="" class="dropzone" method="post" enctype="multipart/form-data">
<div class="col-md-6" style="border: 1px solid black;">
<h1 id="try-it-out">Try it out!</h1>
<div id="dropzone">
<div class="dropzone needsclick dz-clickable" id="photo1">
<div class="dz-message needsclick">
Drop files here or click to upload.
<br>
<span class="note needsclick">
(This is just a demo dropzone. Selected files are <strong>not</strong>
actually uploaded.)
</span>
</div>
</div>
</div>
</div>
<div class="col-md-6" style="border: 1px solid black;">
<h1 id="try-it-out">Try it out!</h1>
<div id="dropzone">
<div class="dropzone needsclick dz-clickable" id="photo2">
<div class="dz-message needsclick">
Drop files here or click to upload.
<br>
<span class="note needsclick">
(This is just a demo dropzone. Selected files are <strong>not</strong>
actually uploaded.)
</span>
</div>
</div>
</div>
</div>
</form>
Jquery :
Dropzone.options.photo1 = {
paramName: "file",
maxFilesize: 2, // MB
accept: function(file, done) {
if (file.name == "justinbieber.jpg") {
done("Naha, you don't.");
}
else { done(); }
}
};
Now the action leads to a controller method via post method and the $request->all()
gives me just a token
.
How can i get the photo name and its values via $request->all()
?
via Gamer