Я пытаюсь отправить форму с некоторыми добавленными файлами dropzone и дополнительными полями.
Мне не нужны эти возможности Dropzone Ajax, потому что я хочу добавить некоторую информацию с помощью дополнительных входов.
Итак, по крайней мере, очень простая форма отправки с несколькими файлами, которая обрабатывается после нажатием кнопки отправки. Пока что клиентская сторона работает нормально, но когда я отправляю форму, $ _FILES пуст! Почему? Что я получил на данный момент:
<?
if (isset($_POST))
{
print_r($_POST);
print_r($_FILES);
exit;
}
?>
<form id = "smart-form" enctype = "multipart/form-data" method = "POST" action = "upload.php">
<div class = "form-body">
<div class = "section">
<div class = "dropzone" id = "myDropzone">
<h3 class = "dz-drop-title"> Drop files here or </h3>
<p class = "dz-clicker"> <span> Browse File </span> </p>
<div class = "fallback">
<input name = "file[]" type = "file" multiple />
</div>
</div>
</div><!-- end section -->
</div><!-- end .form-body section -->
<label style = "padding: 5px;" for = "another_field_1">another field 1 <input id = "another_field_1" type = "text" name = "testinput1"></label><br>
<label style = "padding: 5px;" for = "another_field_2">another field 2 <input id = "another_field_2" type = "text" name = "testinput2"></label>
<div class = "form-footer">
<button type = "submit" class = "button btn-primary"> Send Form </button>
</div><!-- end .form-footer section -->
</form>
<script type = "text/javascript">
jQuery(document).ready(function($){
jQuery(".dropzone").dropzone({
url: "upload.php",
dictDefaultMessage: "Datei bitte hier ablegen!",
success: function() {
jQuery('.success-mark').show();
jQuery('.error-mark').hide();
},
error: function() {
jQuery('.success-mark').hide();
jQuery('.error-mark').show();
}
});
});
</script>
без дропзона он стал рабочей формой. $ _FILES не заполнено.






Удалите скрипт dropzone и посмотрите, что у вас получится?