uploader-plus icon indicating copy to clipboard operation
uploader-plus copied to clipboard

Upload folder with Dnd on Alfresco 5.2 does not work

Open m2je opened this issue 7 years ago • 5 comments

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.

m2je avatar Aug 08 '17 17:08 m2je

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);

m2je avatar Aug 18 '17 17:08 m2je

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.

monicakumari avatar Dec 28 '18 07:12 monicakumari

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);
    

m2je avatar Jan 29 '19 22:01 m2je

Hello, Yes. I have tried the same.. screenshot from 2019-02-06 11-32-02

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 screenshot from 2019-02-06 11-27-59

screenshot from 2019-02-06 11-38-09

**Please guide if you have any idea about this.

Thanks, Monica**

monicakumari avatar Feb 06 '19 06:02 monicakumari

@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.

m2je avatar Feb 12 '19 23:02 m2je