-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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 via web interface of file with same name in different subfolders #10527
Comments
GitMate.io thinks possibly related issues are #9263 (Error when uploading files via web), #2842 ([Files] Upload folders), #8583 (Errors when uploading large files via files drop), #8370 (strange mistake with drag end drop web file interfaces), and #3339 (Add activity entry for files uploaded via files drop). |
I have the same bug. Chrome's console shows a javascript error: Uncaught TypeError: Cannot read property 'done' of null |
Issue is coming from server/apps/files/js/file-upload.js Line 43 in 4eafae4
Id of upload is generated from file name (without the folder) and getTime(). FolderA/test.txt => web-file-upload-1111-timestamp In some cases getTime() is the same which results in identical ids for files in FolderA and FolderB. When i replace getTime with Math.random i cannot reproduce the issue anymore. Owncloud had a similar issue. Is this true for nextcloud too? I think relativePath + fileName + Math.random should prevent the identical ids. |
hello danielkesselberg I tried to change the line to Math.random() i still got the same error again, but only with a lot more identical files not with a few identical files. |
Does it work when you change to code like in the picture? I added this.getFile().relativePath before this.getFile().name |
no, it still does not work. https://nextcloud1.claushviid.dk/s/jqekqbqq6R2ZC5y The only way I could get the files copied into Nextcloud is via Flowupload OC.FileUpload = function(uploader, data) { |
Hmmm... today it is working with the changes made by danielkesselberg ???? |
I have just tried to swap the function with the one of NC "twin brother" and it work perfectly. I have no time now investigate better but this could be the way to check the origin of the bug. |
I'm seeing this error as well, but only with Windows clients if that helps any. |
This issue is still happening on 15.0.0, regardless of browser |
@Lartza i was unsure about my solution and never setup a pull request for it. there were reports that this fix for owncloud (https://github.com/owncloud/core/pull/29393/files) solve the issue as well. had troubles to adopt the fix from owncloud for nextcloud. I guess we could as @skjnldsv @juliushaertl for some advice. |
Seems this changes in /apps/files/js/file-upload.js works for me OC.FileUpload = function(uploader, data) { Need more tests) ps don't foget clear client's browser cache |
This fixes collisions that were causing uploads to break in a very terrible way. Kudos to @kesselb for finding the problematic place and to @hottwister for the proposed solution. Fixes nextcloud#10527.
This fixes collisions that were causing uploads to break in a very terrible way. Kudos to @kesselb for finding the problematic place and to @hottwister for the proposed solution. Fixes #10527.
Steps to reproduce
Create a folder structure like that:
+subfolder001 (contain the file: filename.txt)
+subfolder002 (contain the file: filename.txt)
+subfolder003 (contain the file: filename.txt)
+subfolder004 (contain the file: filename.txt)
+subfolder005 (contain the file: filename.txt)
Drag and drop the five folders at the same time into the nextcloud file area.
Expected behaviour
The five folder with the same structure copied without errors.
Actual behaviour
The files are not copied and the web interface remain blocked. It appens quite always also with just two folders.
NOTE: I have also tryed the same procedure in the official demo of nextcloud.com and it have the same behaviour.
Server configuration
Operating system: Debian 9
Web server: Nginx
Database: MariaDB
PHP version: 7.2
Nextcloud version: 13.0.5
Updated from an older Nextcloud/ownCloud or fresh install: Fresh install
Where did you install Nextcloud from: from git repository
Signing status:
Signing status
List of activated apps:
App list
Tested also disabling all apps.Nextcloud configuration:
Config report
Default unmodified configAre you using external storage, if yes which one: no external storage
Are you using encryption: no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
LDAP configuration (delete this part if not used)
LDAP config
no ldapClient configuration
Browser: Tested with multiple browser chrome, firefox (not possible with edge because do not support folder upload)
Operating system:
Logs
Web server error log
Web server error log
Nothing appears in system logs.
Nextcloud log (data/nextcloud.log)
Nextcloud log
Nothing appears in nextcloud logs also in debugBrowser log
Browser log
The text was updated successfully, but these errors were encountered: