Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload folder with Dnd on Alfresco 5.2 does not work #120

Open
m2je opened this issue Aug 8, 2017 · 5 comments
Open

Upload folder with Dnd on Alfresco 5.2 does not work #120

m2je opened this issue Aug 8, 2017 · 5 comments

Comments

@m2je
Copy link

m2je commented Aug 8, 2017

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
Copy link
Author

m2je commented Aug 18, 2017

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

@monicakumari
Copy link

monicakumari commented Dec 28, 2018

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.

@m2je
Copy link
Author

m2je commented Jan 29, 2019

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

@monicakumari
Copy link

monicakumari commented Feb 6, 2019

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**

@m2je
Copy link
Author

m2je commented Feb 12, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants