uploader-plus
uploader-plus copied to clipboard
Upload folder with Dnd on Alfresco 5.2 does not work
Tried to upload a folder with Dnd and it failed. modified the web/components/uploader-plus/js/dnd-upload-plus.js and added the following to the list of parameter under _startUpload function :
formData.append("createdirectory", fileInfo.uploadData.createdirectory ? "true" : "false"); formData.append("updatenameandmimetype", fileInfo.uploadData.updateNameAndMimetype);
And it's fixed now.
Diff :
@@ -171,7 +171,8 @@
formData.append("username", fileInfo.uploadData.username);
formData.append("overwrite", fileInfo.uploadData.overwrite);
formData.append("thumbnails", fileInfo.uploadData.thumbnails);
-
+ formData.append("createdirectory", fileInfo.uploadData.createdirectory ? "true" : "false");
+ formData.append("updatenameandmimetype", fileInfo.uploadData.updateNameAndMimetype);
if (fileInfo.uploadData.updateNodeRef) {
formData.append("updateNodeRef", fileInfo.uploadData.updateNodeRef);
Hello, I also have the same issue. I am not able to drag n drop folders. even if I have not applied uploader plus on the parent folder or anywhere. I am using uploader plus 1.7. It's showing me error :
The following cannot be uploaded because they are either folders or are zero bytes in size: "undefined"
I tried the above solution but it's not working. getting the below warn at console
WARN [processor.node.NodeFormProcessor] [http-bio-8080-exec-3] Ignoring unrecognised field 'createdirectory'
Please guide, if you have any idea about this.
Thanks.
Sorry @monicakumari ,
It's been a long time since I submitted this patch.
Did you apply my patch toweb/components/uploader-plus/js/dnd-upload-plus.js
?
@@ -171,7 +171,8 @@ formData.append("username", fileInfo.uploadData.username); formData.append("overwrite", fileInfo.uploadData.overwrite); formData.append("thumbnails", fileInfo.uploadData.thumbnails);
formData.append("createdirectory", fileInfo.uploadData.createdirectory ? "true" : "false");
formData.append("updatenameandmimetype", fileInfo.uploadData.updateNameAndMimetype); if (fileInfo.uploadData.updateNodeRef) { formData.append("updateNodeRef", fileInfo.uploadData.updateNodeRef);
Hello,
Yes. I have tried the same..
I have added the lines as per your suggestion but still not able to drag n drop folders. I have attached the screenshot for the error on UI on crome and firefox
**Please guide if you have any idea about this.
Thanks, Monica**
@monicakumari Please note this is a patch for uploader-plus on Alfresco 5.2 and not Alfresco 5.2 itself.
If I recall correctly, without this patch you would run into a client side (JS) error, but yours seems to be a server side error. What I did back then to solve this problem was comparing step by step what Alfresco 5.2 out of the box does for upload file and the look at uploader-plus behavior and saw some missing steps which is added in this patch. Hope this help.