Reputation: 8178
Dropzone works perfectly for everything except passing the file during fallback mode (IE9). Drops work perfect in normal mode, all hidden inputs pass through post perfectly, and all hidden post values work during fallback mode.
The only problem is that $_FILES is empty when IE9 forces fallback mode. I do not have any javascript on the page besides the dropzone.js file, as I understood this process was automatic, and according to everything I have read, it should be... right?
Here is the code on the HTML side -- 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">
</div>
<input type="hidden" name="dept_id" value=5>
</form>
Upvotes: 3
Views: 4237
Reputation: 8178
Well, I'm a little embarrassed. After days trying to figure out what I missed in the dropzone.js file... and scanning every DZ error ever written, it came down to something incredibly silly.
I set up the form according to the instructions, as if the form would be handled 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 that little nugget: enctype="multipart/form-data" DOH. The important point here is that the format of the form must be complete if expecting fallback -- when DZ.js takes over, it does not need to be, thus the documentation (correctly) never shows complete html, and is easy to miss.
Anyway showing the world my idiocy in case anyone else ever has a knucklehead moment of like kind.
Upvotes: 5