server icon indicating copy to clipboard operation
server copied to clipboard

[Bug]: Drag-and-drop folder upload fails when dropping INTO existing folder (works when dropping into root)

Open irayev opened this issue 7 months ago • 9 comments

⚠️ This issue respects the following points: ⚠️

Bug description

When dragging a folder from local computer and dropping it INTO an existing folder on Nextcloud, the upload fails:

  • The target folder is sometimes created but remains empty
  • Files are not uploaded
  • Error appears: "Directory no longer exists" or similar

However, dragging and dropping the SAME folder into the ROOT directory of Nextcloud works correctly.

This behavior started with Nextcloud 33. Works perfectly on Nextcloud 32.x with the same server configuration.

Steps to reproduce

  1. Clean install of Nextcloud 33.0.2 (tested on 33.0.1 and 33.0.2)
  2. Login as admin user
  3. Create a folder named "test" (or use any existing folder)
  4. On your local computer, create a folder with some files inside
  5. Drag the local folder and drop it INTO the "test" folder in Nextcloud web interface
  6. Observe the error

Then test the same drag-and-drop operation into the ROOT directory - it works.

Expected behavior

Folder should upload successfully regardless of target directory depth, just like on Nextcloud 32.x.

Nextcloud Server version

33

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database engine version

PostgreSQL

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

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

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

Configuration report


List of activated Apps


Nextcloud Signing status


Nextcloud Logs


Additional info

  • Works correctly on Nextcloud 32.x
  • Drag-and-drop of SINGLE files works everywhere (root and subfolders)
  • Button upload ("New" → "Upload files") works for folders everywhere
  • Tested on clean Ubuntu 24.04 server with fresh Nextcloud 33 installation
  • Not related to PHP version (tested on 8.3 and 8.4)
  • Not related to file permissions (tested with 777)
  • Not resolved by setting max_chunk_size=0
  • Problem only occurs when dragging a folder INTO an existing folder
  • Dropping the same folder into ROOT works

Browser console error (Chrome):

  • PROPFIND 503 Service Unavailable
  • Error: Invalid response: 503
  • Directory no longer exists

This appears to be a regression in the WebDAV path handling or drop event target detection introduced in Nextcloud 33.

irayev avatar Apr 16 '26 13:04 irayev

I am also experiencing this issue in my environment. I have confirmed that uploading a folder via drag-and-drop consistently fails with a 404 error.

Environment

  • OS: Ubuntu 24.04.4 LTS (Noble Numbat)
  • Docker: 29.4.0
  • Nextcloud Image: nextcloud:33.0.2

Steps to reproduce

  1. Prepare a local folder structure like this:

    nextcloud/
    └── compose.yaml
    
  2. Deploy Nextcloud using Docker Compose:

    volumes:
      nextcloud:
      db:
    
    services:
      db:
        image: mariadb:10.6
        restart: always
        command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
        volumes:
          - db:/var/lib/mysql
        environment:
          - MYSQL_ROOT_PASSWORD=password1234
          - MYSQL_PASSWORD=password1234
          - MYSQL_DATABASE=nextcloud
          - MYSQL_USER=nextcloud
    
      app:
        image: nextcloud:33.0.2
        restart: always
        ports:
          - 8080:80
        links:
          - db
        volumes:
          - nextcloud:/var/www/html
        environment:
          - MYSQL_PASSWORD=password1234
          - MYSQL_DATABASE=nextcloud
          - MYSQL_USER=nextcloud
          - MYSQL_HOST=db
    
  3. Complete the installation and log in.

  4. Open the Documents folder: http://localhost:8080/apps/files/files/16?dir=/Documents

  5. Drag and drop the nextcloud folder (containing compose.yaml) into the browser.

Expected behavior

The folder and its contents should be uploaded successfully.

Actual behavior

The upload fails. The console shows a 404 error during the PUT request to the WebDAV endpoint.

Logs

Full Chrome Dev tools console log

DropService.ts:132  PUT http://localhost:8080/remote.php/dav/files/admin/Documents/nextcloud/compose.yaml 404 (Not Found)
(anonymous) @ xhr.js:198
(anonymous) @ xhr.js:15
(anonymous) @ dispatchRequest.js:51
Promise.then
_request @ Axios.js:163
request @ Axios.js:40
(anonymous) @ bind.js:12
uploadData @ index-DPkUyJ8g.mjs:65
(anonymous) @ index-DPkUyJ8g.mjs:950
(anonymous) @ index.js:378
_tryToStartAnother @ index.js:252
_processQueue @ index.js:290
start @ index.js:430
start @ index-DPkUyJ8g.mjs:622
onDropExternalFiles @ DropService.ts:132
await in onDropExternalFiles
onDrop @ DragAndDropNotice.vue:139
await in onDrop
invokeWithErrorHandling @ vue.runtime.esm.js:3033
invoker @ vue.runtime.esm.js:1832
(anonymous) @ vue.runtime.esm.js:7500
installHook.js:1 [ERROR] @nextcloud/upload: Failed uploading compose.yaml {app: '@nextcloud/upload', uid: 'admin', level: 2, error: AxiosError: Request failed with status code 404
    at r (http://localhost:8080/dist/core-common.js…, file: File, …}
overrideMethod @ installHook.js:1
log @ index.mjs:47
error @ index.mjs:65
(anonymous) @ index-DPkUyJ8g.mjs:984
await in (anonymous)
(anonymous) @ index.js:378
_tryToStartAnother @ index.js:252
_processQueue @ index.js:290
start @ index.js:430
start @ index-DPkUyJ8g.mjs:622
onDropExternalFiles @ DropService.ts:132
await in onDropExternalFiles
onDrop @ DragAndDropNotice.vue:139
await in onDrop
invokeWithErrorHandling @ vue.runtime.esm.js:3033
invoker @ vue.runtime.esm.js:1832
(anonymous) @ vue.runtime.esm.js:7500
installHook.js:1 [ERROR] files: Error while uploading files {app: 'files', uid: 'admin', level: 2, errors: Array(1)}
overrideMethod @ installHook.js:1
log @ index.mjs:47
error @ index.mjs:65
onDropExternalFiles @ DropService.ts:138
await in onDropExternalFiles
onDrop @ DragAndDropNotice.vue:139
await in onDrop
invokeWithErrorHandling @ vue.runtime.esm.js:3033
invoker @ vue.runtime.esm.js:1832
(anonymous) @ vue.runtime.esm.js:7500

I hope this information helps in identifying the cause. I would appreciate it if this could be fixed, as it impacts the core file management experience. Looking forward to a fix

hiro345g avatar Apr 17 '26 08:04 hiro345g

I have this problem too

NicKerrr avatar Apr 19 '26 08:04 NicKerrr

Probably a duplicate of https://github.com/nextcloud/server/issues/58454

provokateurin avatar Apr 20 '26 08:04 provokateurin

@hiro345g, @NicKerrr: Please upvote the original bug report, this normally helps to get the devs attention.

Meanwhile the workaround by @irayev works for me: don't use drag-and-drop, instead use New -> Upload folders. Though I am aware that this might be challenging to communicate to the users...

LM-vb avatar Apr 20 '26 09:04 LM-vb

Tengo el mismo problma buscaste alguna solucion? ya intente de todo pero sin resultado

XxMASDZULxX avatar Apr 21 '26 12:04 XxMASDZULxX

@XxMASDZULxX There's a merged PR at #59294. So the next patch level updates of Nextcloud should solve the issue (release planned for 2026-04-30). Until then, there are only the above mentioned workarounds.

LM-vb avatar Apr 21 '26 12:04 LM-vb

duplicate of https://github.com/nextcloud/server/issues/59459

will be resolved with next releases (this Thursday).

susnux avatar Apr 27 '26 17:04 susnux

Confirmed fixed after updating to the latest release. Thank you!

irayev avatar May 04 '26 06:05 irayev

This issue has been automatically locked because it has been closed for more than 14 days. As we do not monitor closed issues, we are locking this issue to prevent further comments from getting lost in the noise. Please open a new issue if you have a similar problem instead. For general discussions, please use our forum: https://help.nextcloud.com

github-actions[bot] avatar Nov 09 '26 00:11 github-actions[bot]