Dropzone js not uploading file in return mode

Dropzone works great for everything except file transfer in backup mode (IE9). Drops work perfectly in normal mode, all hidden inputs pass through the pillar perfectly, and all hidden column values ​​work during standby mode.

The only problem is that $ _FILES is empty when IE9 forcibly reverts to fallback. I don't have any javascript on the page other than the dropzone.js file, since I realized the process was automatic, and according to everything I've read, it should be ... correct?

Here is the HTML side code - cleaned up some PHP elements for clarity:

<form action="process/process_file_upload.php" method="post" class="dropzone">

<div class="fallback"> 
    <input name="file" type="file" multiple />
    <input type="submit" value="Submit" style="margin-left:8px;">
    <input type="hidden" name="calling_dept" value="home.php">    

<input type="hidden" name="dept_id" value=5>




source to share

1 answer

Okay, I'm a little confused. After days trying to figure out what I was missing in the dropzone.js file ... and scanning every DZ error ever written, it boils down to something incredibly stupid.

I am setting the form according to the instructions, as if the form was being processed by DZ.js. However, while hunting for code errors, I forgot BASIC HTML !!

Here's my original (DZ working) form:

<form action="process/process_file_upload.php" method="post" class="dropzone">


Forgot this little nugget: enctype = "multipart / form-data" DOH. The important point here is that the format of the form must be complete if a return is expected - when DZ.js takes over, it doesn't have to, so the documentation (correctly) never shows the full html and it's easy to miss.

Anyway, showing the world my idiocy in case anyone else ever has a fist moment like that.



All Articles