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

[Bug]: drag&drop upload of folder fails #42252

Closed
4 of 8 tasks
schiessle opened this issue Dec 13, 2023 · 5 comments · Fixed by #42366
Closed
4 of 8 tasks

[Bug]: drag&drop upload of folder fails #42252

schiessle opened this issue Dec 13, 2023 · 5 comments · Fixed by #42366

Comments

@schiessle
Copy link
Member

⚠️ This issue respects the following points: ⚠️

Bug description

I can't upload a folder via drag&drop

Steps to reproduce

  1. Try to upload a folder via drag&drop from your local file manager

With Chrome the upload get stuck:

image

On Firefox the upload gets shows as successful:

image

But the result is not the folder with the files but a empty file with no mimetype:

image

Expected behavior

Either a successful upload or a meaningful error message that drag&drop of folders is not supported

Installation method

None

Nextcloud Server version

28

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

@schiessle schiessle added bug 0. Needs triage Pending check for reproducibility or if it fits our roadmap 28-feedback labels Dec 13, 2023
@hibobmaster
Copy link

hibobmaster commented Dec 14, 2023

In my scenario, firefox/edge can only upload file to root folder. For other sub folder, i got
firefox:

XMLHttpRequest.setRequestHeader: Cannot convert argument 2 to ByteString because the character at index 60 has value 25991 which is greater than 255.

edge:

Uncaught (in promise) TypeError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': String contains non ISO-8859-1 code point.

Upload stuck at estimating time left and nothing happen.

@YYH2913
Copy link

YYH2913 commented Dec 14, 2023

The same problem in chrome
xhr.js:207 Uncaught (in promise) TypeError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': String contains non ISO-8859-1 code point.
at xhr.js:207:17
at Object.T [as forEach] (utils.js:265:10)
at xhr.js:206:13
at new Promise ()
at xhr (xhr.js:49:10)
at E.p (dispatchRequest.js:51:10)
at E.request (Axios.js:146:33)
at Function.request (bind.js:5:15)
at files-main.js?v=fc5569f1-0:2:313816
at files-main.js?v=fc5569f1-0:2:313860

Environment:
PHP Version: 8.1.2
MySQL Version: 10.6.12
Apache Version: 2.4.52
Operating System: Ubuntu 22.04.2 LTS
Language: Simplified Chinese

@solracsf

This comment was marked as abuse.

@skjnldsv

This comment was marked as resolved.

@murray3k
Copy link

Concerning the errors when uploading a folder into a subfolder:
I think there might be a slash "/" missing as a directory separator in line 91 in the DropService.ts between ${path} and ${directory.name}:

const absolutPath = `${davRootPath}${getUploader().destination.path}${path}${directory.name}`

Because when I create a folder "foo" and then drag&drop the folder "bar" into it, absolutPath looks like this:
absolutPath: "/files/[myusername]/foobar" instead of absolutPath: "/files/[myusername]/foo/bar".

Hope this helps somebody. First time looking at Nextcloud code. I don't feel comfortable submitting a patch just yet.

@skjnldsv skjnldsv added 3. to review Waiting for reviews and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Dec 20, 2023
@skjnldsv skjnldsv self-assigned this Dec 20, 2023
@AndyScherzinger AndyScherzinger added this to the Nextcloud 28.0.1 milestone Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants