blueimp/jQuery-File-Upload — Issue #928: autoupload = true vs add callback, download or upload rows not added correctly
Author: patrickleet
Created: 2012-01-06 19:04:15+00:00
State: open

When I use autoupload = true, the upload rows are added correctly, but I have logic that when a zip file is uploaded, it's unzipped on the server side and all of the files in the zip file are sent back as the result. If autoupload is true, only the first file in the array is added to the #files div.

If I use
```javascript
add: function (e, data) {
var jqXHR = data.submit();
}
```
Then all of the results are added to the #files section (download-template), but the upload-template is never shown.

I'd like to have both work?

Example of returned json (extra stuff in there for me to use in the fileuploaddone callback)
```
[{"name":"EAlert.htm","fileName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\EAlert.htm","type":".htm","size":0,"organize":"EAlert","folderName":null,"unzippedFolderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped","valid":true,"error":0},{"name":"EAlert.txt","fileName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\EAlert.txt","type":".txt","size":0,"organize":"EAlert","folderName":null,"unzippedFolderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped","valid":true,"error":0},{"name":"images\\aol.gif","fileName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images\\aol.gif","type":".gif","size":0,"organize":"images","folderName":null,"unzippedFolderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images","valid":true,"error":0},{"name":"images\\dependent_image.jpg","fileName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images\\dependent_image.jpg","type":".jpg","size":0,"organize":"images","folderName":null,"unzippedFolderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images","valid":true,"error":0},{"name":"images\\divider.gif","fileName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images\\divider.gif","type":".gif","size":0,"organize":"images","folderName":null,"unzippedFolderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images","valid":true,"error":0},{"name":"images\\ealert_background.jpg","fileName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images\\ealert_background.jpg","type":".jpg","size":0,"organize":"images","folderName":null,"unzippedFolderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images","valid":true,"error":0},{"name":"images\\ealert_head.jpg","fileName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images\\ealert_head.jpg","type":".jpg","size":0,"organize":"images","folderName":null,"unzippedFolderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images","valid":true,"error":0},{"name":"images\\ealert_previousissues.gif","fileName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images\\ealert_previousissues.gif","type":".gif","size":0,"organize":"images","folderName":null,"unzippedFolderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images","valid":true,"error":0},{"name":"images\\ealert_som1.gif","fileName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images\\ealert_som1.gif","type":".gif","size":0,"organize":"images","folderName":null,"unzippedFolderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images","valid":true,"error":0},{"name":"images\\ealert_som2.gif","fileName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images\\ealert_som2.gif","type":".gif","size":0,"organize":"images","folderName":null,"unzippedFolderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images","valid":true,"error":0},{"name":"images\\its_back_image.jpg","fileName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images\\its_back_image.jpg","type":".jpg","size":0,"organize":"images","folderName":null,"unzippedFolderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images","valid":true,"error":0},{"name":"images\\mass_image.jpg","fileName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images\\mass_image.jpg","type":".jpg","size":0,"organize":"images","folderName":null,"unzippedFolderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images","valid":true,"error":0},{"name":"images\\more.gif","fileName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images\\more.gif","type":".gif","size":0,"organize":"images","folderName":null,"unzippedFolderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images","valid":true,"error":0},{"name":"images\\newclients.gif","fileName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images\\newclients.gif","type":".gif","size":0,"organize":"images","folderName":null,"unzippedFolderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images","valid":true,"error":0},{"name":"images\\outlook.gif","fileName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images\\outlook.gif","type":".gif","size":0,"organize":"images","folderName":null,"unzippedFolderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images","valid":true,"error":0},{"name":"images\\perspective.jpg","fileName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images\\perspective.jpg","type":".jpg","size":0,"organize":"images","folderName":null,"unzippedFolderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images","valid":true,"error":0},{"name":"images\\quiz.gif","fileName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images\\quiz.gif","type":".gif","size":0,"organize":"images","folderName":null,"unzippedFolderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images","valid":true,"error":0},{"name":"images\\right_bg.gif","fileName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images\\right_bg.gif","type":".gif","size":0,"organize":"images","folderName":null,"unzippedFolderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images","valid":true,"error":0},{"name":"images\\rss.gif","fileName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images\\rss.gif","type":".gif","size":0,"organize":"images","folderName":null,"unzippedFolderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images","valid":true,"error":0},{"name":"images\\sms.jpg","fileName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images\\sms.jpg","type":".jpg","size":0,"organize":"images","folderName":null,"unzippedFolderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images","valid":true,"error":0},{"name":"images\\Thumbs.db","fileName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images\\Thumbs.db","type":".db","size":0,"organize":"Thumbs","folderName":null,"unzippedFolderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped\\images","valid":true,"error":0},{"name":"EAlert.zip","fileName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\EAlert.zip","type":".zip","size":105953,"organize":"EAlert","folderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515","unzippedFolderName":"E:\\xyz_data\\ux\\temp\\storage\\100\\2012-01-06_13-54-20_515\\unzipped","valid":true,"error":0}]
```