I have a normal form and I inserted the drozpone inside it following some tips by the community. When I submit it, the dropzone images do not arrive at all on the server, $ _FILES is empty.
FORM HTML
<form class="multi-page-form" method="post" id="form_publish" enctype="multipart/form-data">
<div class="row">
<!-- Dropzone -->
<div class="dropzone dropzone-previews" id="my-awesome-dropzone"></div>
<div class="col-lg-6 col-md-6">
<div class="form-block">
<label>Título do anúncio</label>
<input class="border" type="text" name="title">
</div>
</div>
<div class="col-lg-6 col-md-6">
<div class="form-block">
<label>Palavras-chave</label>
<input type="text" placeholder="Insira suas palavras chaves" class="border" data-role="tagsinput" name="keywords" id="tagPlaces">
</div>
</div>
<div class="center">
<button type="button" id="btn-send-property" class="button button-icon large alt"><i class="fa fa-angle-right"></i> Enviar Imóvel</button>
</div>
</div>
</form>
JavaScript
Dropzone.autoDiscover = false;
var myDropzone = new Dropzone('#my-awesome-dropzone', {
url: 'User/publish',
paramName: "files",
autoDiscover: false,
addRemoveLinks: true,
maxFilesize: 3.0,
maxFiles: 30,
parallelUploads: 10000,
uploadMultiple: true,
autoProcessQueue: false
});
$("#btn-send-property").click(function () {
myDropzone.processQueue();
$("#form_publish").submit();
});
PHP
echo '<pre>';
var_dump($_FILES);
echo '</pre>';
die();