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

Dragging and dropping files into the shared directory does not work unless we go into it. #24720

Closed
AlexShelest opened this issue Dec 16, 2020 · 6 comments

Comments

@AlexShelest
Copy link

Steps to reproduce

  1. Share directory link from user Alex with creating and editing rights
  2. Share link to user Max
  3. From user Max drag and drop files to shared link without go to directory.
  4. We gets endless uploading file.

Expected behaviour

Uploading files by dragging and dropping onto a directory without entering it does not work.
Снимок экрана 2020-12-16 094232

Actual behaviour

Infinite file upload, file upload works fine if you go to this directory before upload and drag and drop them there

Server configuration

Operating system: Debian 9

Web server: nginx/1.19.6

Database: MariaDB 10.4.17

PHP version: PHP 7.3.25

Nextcloud version: 20.0.3

Updated from an older Nextcloud/ownCloud or fresh install: Upgraded from 19.0.6

Where did you install Nextcloud from: From offical site.

Signing status:

https://cloudhelpme.ru/index.php/settings/integrity/failed


No errors have been found.

List of activated apps:

Enabled:
  - accessibility: 1.6.0
  - activity: 2.13.4
  - cloud_federation_api: 1.3.0
  - dav: 1.16.1
  - federatedfilesharing: 1.10.1
  - files: 1.15.0
  - files_external: 1.11.1
  - files_pdfviewer: 2.0.1
  - files_rightclick: 0.17.0
  - files_sharing: 1.12.0
  - files_trashbin: 1.10.1
  - files_videoplayer: 1.9.0
  - keeweb: 0.6.4
  - logreader: 2.5.0
  - lookup_server_connector: 1.8.0
  - music: 0.17.3
  - nextcloud_announcements: 1.9.0
  - notifications: 2.8.0
  - oauth2: 1.8.0
  - password_policy: 1.10.1
  - privacy: 1.4.0
  - provisioning_api: 1.10.0
  - serverinfo: 1.10.0
  - settings: 1.2.0
  - sharebymail: 1.10.0
  - theming: 1.11.0
  - twofactor_backupcodes: 1.9.0
  - updatenotification: 1.10.0
  - viewer: 1.4.0
  - workflowengine: 2.2.0
Disabled:
  - admin_audit
  - comments
  - contactsinteraction
  - dashboard
  - encryption
  - federation
  - files_versions
  - firstrunwizard
  - photos
  - recommendations
  - support
  - survey_client
  - systemtags
  - text
  - user_ldap
  - user_status
  - weather_status

Nextcloud configuration:

Config report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "82.202.167.36",
            "cloudhelpme.ru",
            "www.cloudhelpme.ru"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "http:\/\/82.202.167.36",
        "dbtype": "mysql",
        "version": "20.0.3.2",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpsecure": "ssl",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "updater.release.channel": "stable",
        "mysql.utf8mb4": true,
        "data-fingerprint": "38e9f34d4fdc83993de47a3f768730e9",
        "activity_expire_days": 30,
        "trashbin_retention_obligation": "7, 10",
        "enable_previews": false,
        "filelocking.enabled": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "dbindex": 0,
            "timeout": 1.5
        },
        "mail_sendmailmode": "smtp",
        "force_language": "ru",
        "app_install_overwrite": [
            "keeweb"
        ]
    }
}

Client configuration

Browser: Google Chrome 87.0.4280.88

Operating system: Windows 10 Pro 2004

Logs

Web server error log

No errors in webserver logs.

Nextcloud log (data/nextcloud.log)

No errors in nextcloud logs.

Browser log

main.js?v=e3a5b9a7-40:1 $ is deprecated: The global jQuery is deprecated. It will be updated to v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own.
ie @ main.js?v=e3a5b9a7-40:1
main.js?v=e3a5b9a7-40:1 $ is deprecated: The global jQuery is deprecated. It will be updated to v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own.
ie @ main.js?v=e3a5b9a7-40:1
main.js?v=e3a5b9a7-40:1 $ is deprecated: The global jQuery is deprecated. It will be updated to v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own.
ie @ main.js?v=e3a5b9a7-40:1
additionalScripts.js?v=e3a5b9a7-40:1 null
_formatRemoteShare @ additionalScripts.js?v=e3a5b9a7-40:1
merged-index.js?v=e3a5b9a7-40:2448 Uncaught TypeError: Cannot read property 'get' of null
    at HTMLInputElement.add (merged-index.js?v=e3a5b9a7-40:2448)
    at e.<computed>.<computed>._trigger (main.js?v=e3a5b9a7-40:1)
    at File.<anonymous> (merged-index.js?v=e3a5b9a7-40:9858)
    at Function.each (main.js?v=e3a5b9a7-40:1)
    at e.<computed>.<computed>._onAdd (merged-index.js?v=e3a5b9a7-40:9851)
    at e.<computed>.<computed>._onAdd (main.js?v=e3a5b9a7-40:1)
    at Object.<anonymous> (merged-index.js?v=e3a5b9a7-40:10096)
    at l (main.js?v=e3a5b9a7-40:1)
    at Object.add [as done] (main.js?v=e3a5b9a7-40:1)
    at Object.always (main.js?v=e3a5b9a7-40:1)
main.js?v=e3a5b9a7-40:1 $ is deprecated: The global jQuery is deprecated. It will be updated to v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own.
ie @ main.js?v=e3a5b9a7-40:1
get @ main.js?v=e3a5b9a7-40:1
_onResize @ merged-index.js?v=e3a5b9a7-40:4606
He @ main.js?v=e3a5b9a7-40:1
(anonymous) @ main.js?v=e3a5b9a7-40:1
(anonymous) @ main.js?v=e3a5b9a7-40:1
a @ main.js?v=e3a5b9a7-40:1
(anonymous) @ main.js?v=e3a5b9a7-40:1
main.js?v=e3a5b9a7-40:1 $ is deprecated: The global jQuery is deprecated. It will be updated to v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own.
ie @ main.js?v=e3a5b9a7-40:1
get @ main.js?v=e3a5b9a7-40:1
(anonymous) @ merged-index.js?v=e3a5b9a7-40:4607
each @ main.js?v=e3a5b9a7-40:1
_onResize @ merged-index.js?v=e3a5b9a7-40:4606
He @ main.js?v=e3a5b9a7-40:1
(anonymous) @ main.js?v=e3a5b9a7-40:1
(anonymous) @ main.js?v=e3a5b9a7-40:1
a @ main.js?v=e3a5b9a7-40:1
(anonymous) @ main.js?v=e3a5b9a7-40:1

@AlexShelest AlexShelest added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Dec 16, 2020
@spralexx
Copy link

I have a probably related problem with version 20.0.8 and 21.0.0.
Same error description but it does not only happen with shared folders but also with normal ones.
The Javascript console is giving me the same error.

@brunt82
Copy link

brunt82 commented May 12, 2021

I could reproduce it in our environment (NC 20.0.9) and with https://try.nextcloud.com too:

Uploading a file into a subfolder by drag and drop does not work. It does not matter if the folder is shared or not. Drag and drop of a file only works with root directories.

Here a screenshot of FF console:

grafik

@Ami-OS
Copy link

Ami-OS commented Jul 2, 2021

I am using NC 20.0.11 and I have the same situation. Regardless of whether the folder is shared or not.

Screenshot 2021-07-03 041022

Screenshot 2021-07-03 041619

My app list
Enabled:
  - accessibility: 1.6.0
  - activity: 2.13.4
  - admin_audit: 1.10.0
  - apporder: 0.13.0
  - bruteforcesettings: 2.2.0
  - calendar: 2.3.0
  - checksum: 1.1.2
  - cloud_federation_api: 1.3.0
  - comments: 1.10.0
  - contacts: 3.5.1
  - contactsinteraction: 1.1.0
  - dashboard: 7.0.0
  - dav: 1.16.2
  - federatedfilesharing: 1.10.2
  - federation: 1.10.1
  - files: 1.15.0
  - files_3d: 0.3.3
  - files_external: 1.11.1
  - files_linkeditor: 1.1.5
  - files_markdown: 2.3.3
  - files_pdfviewer: 2.0.1
  - files_rightclick: 0.17.0
  - files_sharing: 1.12.2
  - files_texteditor: 2.14.0
  - files_trashbin: 1.10.1
  - files_versions: 1.13.0
  - files_videoplayer: 1.9.0
  - forms: 2.2.4
  - imageconverter: 1.3.1
  - impersonate: 1.7.0
  - integration_github: 1.0.0
  - issuetemplate: 0.7.0
  - jsloader: 1.5.0
  - logreader: 2.5.0
  - lookup_server_connector: 1.8.0
  - mail: 1.9.5
  - maps: 0.1.8
  - metadata: 0.13.0
  - music: 1.2.1
  - nextcloud_announcements: 1.9.0
  - notes: 4.1.0
  - notifications: 2.8.0
  - oauth2: 1.8.0
  - password_policy: 1.10.1
  - photos: 1.2.3
  - previewgenerator: 3.1.1
  - privacy: 1.4.0
  - provisioning_api: 1.10.0
  - quota_warning: 1.9.1
  - ransomware_protection: 1.10.1
  - recommendations: 0.8.0
  - serverinfo: 1.10.0
  - settings: 1.2.0
  - sharebymail: 1.10.0
  - side_menu: 1.23.1
  - spreed: 10.1.2
  - support: 1.3.0
  - systemtags: 1.10.0
  - text: 3.1.0
  - theming: 1.11.0
  - theming_customcss: 1.9.0
  - twofactor_backupcodes: 1.9.0
  - twofactor_totp: 5.0.0
  - updatenotification: 1.10.0
  - user_status: 1.0.1
  - video_converter: 1.0.1
  - viewer: 1.4.0
  - weather_status: 1.0.0
  - workflowengine: 2.2.0
Disabled:
  - encryption
  - firstrunwizard
  - survey_client
  - user_ldap

@pjft
Copy link
Contributor

pjft commented Jul 29, 2021

Correct. This was introduced here f9536b0 and it seems to happen in and subdirectory that is not at the root of the user's file folder.

For the following structure:

[root]
+ folder
|--- subfolder
  1. Dragging file(s) to root works.
  2. Dragging file(s) to "folder" while browsing root works. targetSubdir is folder.
  3. Dragging file(s) to "folder" while browsing folder works.
  4. Dragging file(s) to "subfolder" while browsing folder does not work. targetSubdir is /subfolder. upload.uploader.fileList.getModelForFile(targetSubdir) is null.
  5. Dragging file(s) to "subfolder" while browsing subfolder works.

I'm happy to try to fix it, but I'm not sure what should the the element to use to find the quota. Should I always check "folder" for any subfolder in it? Or are there other cases or subfolder-specific quotas?

Apologies if the question is naive, but I am ignorant of quotas here.

@pjft
Copy link
Contributor

pjft commented Jul 29, 2021

I suppose that maybe my question is: in what scenarios - other than when in the root folder where, effectively, you would have different shares mounted - would the free quota space in a subfolder not be the same as in the current folder?

I'll submit a PR and hopefully we can clarify that there.

pjft added a commit to pjft/server that referenced this issue Jul 29, 2021
Drag and drop of external (OS filesystem) to subdirectories in the browser would fail on specific cases, mainly when the subdirectory was no longer off the root folder.
This seemed to have been an issue introduced with the subdirectory free space calculation [here](nextcloud@f9536b0) and it seems to fail for any subdirectory that doesn't belong to the root folder.

Bug reports:
- https://help.nextcloud.com/t/drag-drop-into-subfolders/120731
- nextcloud#24720

I couldn't find any reference on scenarios or quota management that would suggest when a subdirectory's free space would be different to the parent's free space, other than when on the root folder, where subdirectories can be external mounts.

As such, if my understanding is correct (please review), this calculation can - and should - be made by getting the free space from the first subdirectory in the total path, which caters for all subdirectory scenarios.

Please advise, happy to help improve this.
pjft added a commit to pjft/server that referenced this issue Jul 29, 2021
Drag and drop of external (OS filesystem) to subdirectories in the browser would fail on specific cases, mainly when the subdirectory was no longer off the root folder.
This seemed to have been an issue introduced with the subdirectory free space calculation [here](nextcloud@f9536b0) and it seems to fail for any subdirectory that doesn't belong to the root folder.

Bug reports:
- https://help.nextcloud.com/t/drag-drop-into-subfolders/120731
- nextcloud#24720

I couldn't find any reference on scenarios or quota management that would suggest when a subdirectory's free space would be different to the parent's free space, other than when on the root folder, where subdirectories can be external mounts.

As such, if my understanding is correct (please review), this calculation can - and should - be made by getting the free space from the first subdirectory in the total path, which caters for all subdirectory scenarios.

Please advise, happy to help improve this.

Signed-off-by: pjft <paulo.j.tavares@gmail.com>
pjft added a commit to pjft/server that referenced this issue Jul 30, 2021
Drag and drop of external (OS filesystem) to subdirectories in the browser would fail on specific cases, mainly when the subdirectory was no longer off the root folder.
This seemed to have been an issue introduced with the subdirectory free space calculation [here](nextcloud@f9536b0) and it seems to fail for any subdirectory that doesn't belong to the root folder.

Bug reports:
- https://help.nextcloud.com/t/drag-drop-into-subfolders/120731
- nextcloud#24720

I couldn't find any reference on scenarios or quota management that would suggest when a subdirectory's free space would be different to the parent's free space, other than when on the root folder, where subdirectories can be external mounts.

As such, if my understanding is correct (please review), this calculation can - and should - be made by getting the free space from the first subdirectory in the total path, which caters for all subdirectory scenarios.

Please advise, happy to help improve this.

Signed-off-by: pjft <paulo.j.tavares@gmail.com>
@szaimen szaimen added 2. developing Work in progress feature: files and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Aug 8, 2021
pjft added a commit to pjft/server that referenced this issue Aug 10, 2021
Drag and drop of external (OS filesystem) to subdirectories in the browser would fail on specific cases, mainly when the subdirectory was no longer off the root folder.
This seemed to have been an issue introduced with the subdirectory free space calculation [here](nextcloud@f9536b0) and it seems to fail for any subdirectory that doesn't belong to the root folder.

Bug reports:
- https://help.nextcloud.com/t/drag-drop-into-subfolders/120731
- nextcloud#24720

I couldn't find any reference on scenarios or quota management that would suggest when a subdirectory's free space would be different to the parent's free space, other than when on the root folder, where subdirectories can be external mounts.

As such, if my understanding is correct (please review), this calculation can - and should - be made by getting the free space from the first subdirectory in the total path, which caters for all subdirectory scenarios.

Please advise, happy to help improve this.

Co-authored-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
Signed-off-by: pjft <paulo.j.tavares@gmail.com>
pjft added a commit to pjft/server that referenced this issue Aug 10, 2021
Drag and drop of external (OS filesystem) to subdirectories in the browser would fail on specific cases, mainly when the subdirectory was no longer off the root folder.
This seemed to have been an issue introduced with the subdirectory free space calculation [here](nextcloud@f9536b0) and it seems to fail for any subdirectory that doesn't belong to the root folder.

Bug reports:
- https://help.nextcloud.com/t/drag-drop-into-subfolders/120731
- nextcloud#24720

I couldn't find any reference on scenarios or quota management that would suggest when a subdirectory's free space would be different to the parent's free space, other than when on the root folder, where subdirectories can be external mounts.

As such, if my understanding is correct (please review), this calculation can - and should - be made by getting the free space from the first subdirectory in the total path, which caters for all subdirectory scenarios.

Please advise, happy to help improve this.

Co-authored-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
Signed-off-by: pjft <paulo.j.tavares@gmail.com>
pjft added a commit to pjft/server that referenced this issue Aug 12, 2021
Drag and drop of external (OS filesystem) to subdirectories in the browser would fail on specific cases, mainly when the subdirectory was no longer off the root folder.
This seemed to have been an issue introduced with the subdirectory free space calculation [here](nextcloud@f9536b0) and it seems to fail for any subdirectory that doesn't belong to the root folder.

Bug reports:
- https://help.nextcloud.com/t/drag-drop-into-subfolders/120731
- nextcloud#24720

I couldn't find any reference on scenarios or quota management that would suggest when a subdirectory's free space would be different to the parent's free space, other than when on the root folder, where subdirectories can be external mounts.

As such, if my understanding is correct (please review), this calculation can - and should - be made by getting the free space from the first subdirectory in the total path, which caters for all subdirectory scenarios.

Please advise, happy to help improve this.

Co-authored-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
Signed-off-by: pjft <pjft@users.noreply.github.com>
pjft added a commit to pjft/server that referenced this issue Aug 13, 2021
Drag and drop of external (OS filesystem) to subdirectories in the browser would fail on specific cases, mainly when the subdirectory was no longer off the root folder.
This seemed to have been an issue introduced with the subdirectory free space calculation [here](nextcloud@f9536b0) and it seems to fail for any subdirectory that doesn't belong to the root folder.

Bug reports:
- https://help.nextcloud.com/t/drag-drop-into-subfolders/120731
- nextcloud#24720

I couldn't find any reference on scenarios or quota management that would suggest when a subdirectory's free space would be different to the parent's free space, other than when on the root folder, where subdirectories can be external mounts.

As such, if my understanding is correct (please review), this calculation can - and should - be made by getting the free space from the first subdirectory in the total path, which caters for all subdirectory scenarios.

Please advise, happy to help improve this.

Co-authored-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
Signed-off-by: pjft <pjft@users.noreply.github.com>
backportbot-nextcloud bot pushed a commit that referenced this issue Oct 17, 2021
Drag and drop of external (OS filesystem) to subdirectories in the browser would fail on specific cases, mainly when the subdirectory was no longer off the root folder.
This seemed to have been an issue introduced with the subdirectory free space calculation [here](f9536b0) and it seems to fail for any subdirectory that doesn't belong to the root folder.

Bug reports:
- https://help.nextcloud.com/t/drag-drop-into-subfolders/120731
- #24720

I couldn't find any reference on scenarios or quota management that would suggest when a subdirectory's free space would be different to the parent's free space, other than when on the root folder, where subdirectories can be external mounts.

As such, if my understanding is correct (please review), this calculation can - and should - be made by getting the free space from the first subdirectory in the total path, which caters for all subdirectory scenarios.

Please advise, happy to help improve this.

Co-authored-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
Signed-off-by: pjft <pjft@users.noreply.github.com>
backportbot-nextcloud bot pushed a commit that referenced this issue Oct 17, 2021
Drag and drop of external (OS filesystem) to subdirectories in the browser would fail on specific cases, mainly when the subdirectory was no longer off the root folder.
This seemed to have been an issue introduced with the subdirectory free space calculation [here](f9536b0) and it seems to fail for any subdirectory that doesn't belong to the root folder.

Bug reports:
- https://help.nextcloud.com/t/drag-drop-into-subfolders/120731
- #24720

I couldn't find any reference on scenarios or quota management that would suggest when a subdirectory's free space would be different to the parent's free space, other than when on the root folder, where subdirectories can be external mounts.

As such, if my understanding is correct (please review), this calculation can - and should - be made by getting the free space from the first subdirectory in the total path, which caters for all subdirectory scenarios.

Please advise, happy to help improve this.

Co-authored-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
Signed-off-by: pjft <pjft@users.noreply.github.com>
@skjnldsv
Copy link
Member

skjnldsv commented Dec 3, 2021

fixed

@skjnldsv skjnldsv closed this as completed Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants