I was using the dropzone.js to handle the upload part in frontend, using JQuery.
My testing case are:
Upload a 34 MB file. Works fine...
Upload a 27 MB file. Works fine...
Upload two files, each of them is 5 MB. Works fine...
Upload two files, 34 MB + 27 MB. Fail , $_FILES
is an empty array
Here is the JQuery code:
<script>
$(document).ready(function () {
Dropzone.options.myAwesomeDropzone = {
autoProcessQueue: false,
url: '<?= site_url("admin/video/upload"); ?>',
addRemoveLinks: true,
previewsContainer: ".dropzone-previews",
uploadMultiple: true,
parallelUploads: 50,
maxFilesize: 500, //500MB
acceptedFiles: 'video/*',
maxFiles: 100,
init: function () {
var myDropzone = this;
myDropzone.on("success", function (file, response) {
$("#success, #fail").hide();
$("#" + response).show();
});
myDropzone.on("maxfilesexceeded", function (file) {
this.removeFile(file);
});
$("#submit-all").click(function (e) {
e.preventDefault();
e.stopPropagation();
myDropzone.processQueue();
});
}
}
});
</script>
Here is the PHP code:
public function upload() {
die(var_dump($_FILES));
}
So, why the $_FILES
is empty and how to fix it? Thanks a lot.