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

Cannot upload empty folder via web interface #11864

Closed
tomtomas99911 opened this issue Oct 16, 2018 · 34 comments
Closed

Cannot upload empty folder via web interface #11864

tomtomas99911 opened this issue Oct 16, 2018 · 34 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: files needs info

Comments

@tomtomas99911
Copy link

tomtomas99911 commented Oct 16, 2018

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Use NX 13 or 14 - try to upload empty folder

Expected behaviour

Uploaded empty folder (for example for creating directory tree).

Actual behaviour

Folder is not uploaded/created.

Server configuration

Operating system:
Debian 9
Web server:
Apache 2.4
Database:
MySQL
PHP version:
7.2
Nextcloud version: (see Nextcloud admin page)
14.0.1 (13 also related)

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #5053 (Can't delete an empty directory from the web interface), #11366 (Upload of folders in IE via web does not work anymore), #4243 (cannot delete files in upload-only folder), #4604 (Upload via public folder fails), and #6339 (Cannot mass upload folders with files (upload share)).

@Knot3n
Copy link

Knot3n commented Oct 16, 2018

Hi,

please show us some logfiles ... Nextcloud / Apache Log

@tomtomas99911
Copy link
Author

There are no error logs in Nextcloud (lvl debug)/Apache.

@Knot3n
Copy link

Knot3n commented Oct 16, 2018

Can you use another pc to test that?
Mobile phone?

@tomtomas99911
Copy link
Author

Sure - tested on Windows 10 (Chrome, Firefox) and Ubuntu 18:04 (Chrome, Firefox too) - same problem here.

@Knot3n
Copy link

Knot3n commented Oct 16, 2018

That is in case strange, do you have maybe error logs from PHP-FPM?

Can you test that with the Nextcloud Software for Windows 10

I tested it right now on my imac without problems / errors.

@tomtomas99911
Copy link
Author

Nextcloud client on Windows 10 can create empty folder, this is related only in browser. No errors in php-fpm.

@Knot3n
Copy link

Knot3n commented Oct 16, 2018

Hi,

i can reproduce this "problem".

Seems like its a "security feature".

You can simply add a .txt file into the folders to upload them, that should fix that.

@tomtomas99911
Copy link
Author

What it means security feature please?

When it is a security feature, there will might be a info warning like this "you cannot upload empty folder..."

@tomtomas99911
Copy link
Author

@Knot3n

@Knot3n
Copy link

Knot3n commented Oct 25, 2018

@tomtomas99911 i dont really know why.

You can create over the Software Folders - over the webinterface too (with dropdown menu).

But i dont know why you cant uplaod empty folders over the webinterface (Drag & Drop).

@owncloud-lumineau
Copy link

If you drag & drop a whole tree containing empty folders, those are not taken into account. Furthermore, it is recursive so that if folder A contains only one object as empty folder B, folder B is not picked in the copy and, as a result, folder A becomes empty as well and is not copied ether.

You may try this way:

First, you build a tree on you're desktop, outside Nextcloud like this

├── folder-A
│   ├── file-A
│   ├── folder-A1
│   │   └── file-A1
│   ├── folder-A2
│   │   └── file-A2
│   ├── folder-A3
│   ├── folder-A4
│   └── folder-A5
├── folder-B
│   ├── file-B1
│   ├── folder-B1
│   │   └── file-B1
│   ├── folder-B2
│   │   └── file-B2
│   ├── folder-B3
│   ├── folder-B4
│   └── folder-B5
├── folder-C
│   ├── folder-C1
│   ├── folder-C2
│   └── folder-C3
├── folder-D
│   ├── file-D
│   ├── folder-D1
│   ├── folder-D2
│   └── folder-D3
│   ├── folder-D31
│   │   ├── folder-D311
│   │   └── folder-D312
│   └── folder-D32
└── folder-E
├── file-E1
└── file-E2

Then you may copy all these 5 folders using drag&drop:

├── dossier-A
├── dossier-B
├── dossier-C
├── dossier-D
└── dossier-E

What is done is this:

├── folder-A
│   ├── file-A
│   ├── folder-A1
│   │   └── file-A1
│   ├── folder-A2
│   │   └── file-A2
│   ├── folder-A3 --> empty: not picked
│   ├── folder-A4 --> empty: not picked
│   └── folder-A5 --> empty: not picked
├── folder-B
│   ├── file-B1
│   ├── folder-B1
│   │   └── file-B1
│   ├── folder-B2
│   │   └── file-B2
│   ├── folder-B3 --> empty: not picked
│   ├── folder-B4 --> empty: not picked
│   └── folder-B5 --> empty: not picked
├── folder-C --> empty(): not picked
│   ├── folder-C1 --> empty: not picked
│   ├── folder-C2 --> empty: not picked
│   └── folder-C3 --> empty: not picked
├── folder-D
│   ├── file-D
│   ├── folder-D1 --> empty: not picked
│   ├── folder-D2 --> empty: not picked
│   └── folder-D3 --> empty(
): not picked
│   ├── folder-D31 --> empty(*): not picked
│   │   ├── folder-D311 --> empty: not picked
│   │   └── folder-D312 --> empty: not picked
│   └── folder-D32 --> empty: not picked
└── folder-E
├── file-E1
└── file-E2

(*) recursivity: becomes empty since subs are not picked

With the following final result in NC after copying is done:

├── folder-A
│   ├── file-A
│   ├── folder-A1
│   │   └── file-A1
│   └── folder-A2
│   └── file-A2
├── folder-B
│   ├── file-B1
│   ├── folder-B1
│   │   └── file-B1
│   └── folder-B2
│   └── file-B2
├── folder-D
│   └── file-D
└── folder-E
├── file-E1
└── file-E2

I have tried on NC 14.0.4 and NC 15.0.4

@tomtomas99911
Copy link
Author

tomtomas99911 commented Feb 15, 2019

I know how to do it manually, thank you! :).

But BFU users, are accustomed to this function. If you want to upload empty folder structure (or normal forlder structure with some empty folder) you can do it on other cloud solutions (e.g. Google Drive).

And when BFU upload folder with drag&drop they are expecting that everything which is in that folder will be uploaded (including folder structure [empty or not]) especially when there is no error reported during upload.

@owncloud-lumineau
Copy link

I know how to do it manually, thank you! :).

The clearer is the better, right ?

I don't think this should be considered as a feature to deal with, regardless the kind of users your Nextcloud proudly serves. I kwow Google, Dropbox, MS etc. are doing go thing for the user world; still I keep interested in these alternatives that give you the opportunity to keep your data warmly at home. Plus, Nextcloud does not deserve to give up and drop it for Google & Co at the first glitch, does it ?

Since your second point sounds rather opposite to the first one, this is where we meet: if you import a entire tree into you Nextcloud, you trust the system to do exactly what you asked him to do (at most, you could have a setting to say whereas you want to filter empty folders during copy or to take the whole thing whatever it cost).

@zpintar
Copy link

zpintar commented Mar 14, 2019

This bug, and (worse) #14506 bug make Nextcloud pretty useless for many cloud users who expect that this functions work perfect. Especially because Nextcloud isn't something new, but very mature cloud system.
Missing "whole folder upload" option via "+" menu also is unacceptable. For example, Pydio and newer Cells this options have thoroughly integrated.

@zpintar
Copy link

zpintar commented May 16, 2019

Any news here? Nextcloud 16 still has this bug.

@skjnldsv skjnldsv added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Jun 12, 2019
@zpintar
Copy link

zpintar commented Aug 29, 2019

Still nothing? (I've just tried on NC 16.0.4 and the bug is still here)
Maybe Nexcloud 17 will resolve this annoying bug? Anybody?

@wiswedel
Copy link
Contributor

just confirmed with 17.0.1 and 18.0.0 Beta 2

@zpintar
Copy link

zpintar commented Dec 17, 2019

just confirmed with 17.0.1 and 18.0.0 Beta 2

But 17.0.1. is out before some time and still do not work?!? maybe confirmed for 17.0.2?

@wiswedel
Copy link
Contributor

just confirmed with 17.0.1 and 18.0.0 Beta 2

But 17.0.1. is out before some time and still do not work?!? maybe confirmed for 17.0.2?

No no, misunderstanding: I could confirm (aka reproduce) the issue with 17.0.1 and 18b2!

@zpintar
Copy link

zpintar commented Dec 17, 2019

Ah, right! :)
So, nothing new about this bug (or we have a wrong perception and this is not a bug but feature! ;) )

@wiswedel
Copy link
Contributor

I totally agree that this is bad behavior. With 17.0.2/18.0.0 it's not gonna be able to get addressed, but let's see what's possible after that.

@wiswedel

This comment has been minimized.

@skjnldsv skjnldsv added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Apr 10, 2020
@zpintar

This comment has been minimized.

@skjnldsv

This comment has been minimized.

@dseeker

This comment has been minimized.

@leon0625

This comment has been minimized.

@lue30499

This comment has been minimized.

@zpintar
Copy link

zpintar commented Dec 2, 2020

I think that Nextcloud deserves better upload engine including option for uploading whole folder at once. Not only by drag&drop routines. And it is very strange to me that some cloud service as Nextcloud has disadvantage like impossibility to upload empty folder tree. This is a bug - an enormous one!

@magicvodi
Copy link

We have the same problem on 20.0.9, on Windows / Linux Chrome & Firefox:
When Users try to upload folders via web interface the empty folders are ignored.
Here is the Apache Log for uploading the folders a, b and c, a&b are empty, c has a single file:

172.17.42.1 - - [20/May/2021:14:59:22 +0200] "MKCOL /remote.php/dav/files/admin/Upload/c HTTP/1.1" 201 611 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0"
172.17.42.1 - - [20/May/2021:14:59:22 +0200] "PROPFIND /remote.php/dav/files/admin/Upload/c HTTP/1.1" 207 1304 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0"
172.17.42.1 - - [20/May/2021:14:59:22 +0200] "PUT /remote.php/webdav/Upload/c/asdf HTTP/1.1" 201 902 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0"
172.17.42.1 - - [20/May/2021:14:59:22 +0200] "GET /index.php/apps/files/ajax/getstoragestats.php?dir=%2FUpload HTTP/1.1" 200 971 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0"

and nextcloud.log:

{
  "reqId": "otQ0rzXOxRF3tozr7w3M",
  "level": 1,
  "time": "2021-05-20T12:59:22+00:00",
  "remoteAddr": "192.168.129.77",
  "user": "admin",
  "app": "no app in context",
  "method": "PUT",
  "url": "/remote.php/webdav/Upload/c/asdf",
  "message": "Deprecated event type for {\"[object] (OCP\\SabrePluginEvent)\":{\"*statusCode\":200,\"*message\":\"\",\"*server\":{\"[object] (OCA\\DAV\\Connector\\Sabre\\Server)\":{\"tree\":\"[object] (OCA\\DAV\\Connector\\Sabre\\ObjectTree)\",\"*baseUri\":\"/remote.php/webdav/\",\"httpResponse\":\"[object] (Sabre\\HTTP\\Response)\",\"httpRequest\":\"[object] (Sabre\\HTTP\\Request)\",\"sapi\":\"[object] (Sabre\\HTTP\\Sapi)\",\"*plugins\":[],\"transactionType\":null,\"protectedProperties\":{\"...\":\"Over 20 items, aborting normalization\"},\"debugExceptions\":false,\"resourceTypeMapping\":[],\"enablePropfindDepthInfinity\":true,\"xml\":\"[object] (Sabre\\DAV\\Xml\\Service)\",\"*listeners\":{\"...\":\"Over 20 items, aborting normalization\"},\"*wildcardListeners\":[],\"*listenerIndex\":[],\"*logger\":null}},\"Symfony\\Contracts\\EventDispatcher\\EventpropagationStopped\":false}}: null",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0",
  "version": "20.0.9.1"
}

So nothing in the logs for the empty folders.

@PVince81
Copy link
Member

PVince81 commented Nov 5, 2021

as far as I remember this is likely a limitation in the browser's API and that the empty folders are not exposed but only files
the parent folders are inferred from the file listing

not sure if this has improved with recent browser APIs, needs some research

@PVince81
Copy link
Member

PVince81 commented Nov 5, 2021

would need to debug in the caller of https://github.com/nextcloud/server/blob/master/apps/files/js/file-upload.js#L927

it is also possible that it's a limitation of the library used for uploads

@skjnldsv
Copy link
Member

skjnldsv commented Nov 8, 2021

owncloud/core#39285

julien-nc pushed a commit that referenced this issue Nov 8, 2021
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
backportbot-nextcloud bot pushed a commit that referenced this issue Nov 8, 2021
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
backportbot-nextcloud bot pushed a commit that referenced this issue Nov 8, 2021
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
@szaimen
Copy link
Contributor

szaimen commented Jan 9, 2023

Hi, please update to 24.0.8 or better 25.0.2 and report back if it fixes the issue. Thank you!

@szaimen szaimen added needs info 0. Needs triage Pending check for reproducibility or if it fits our roadmap and removed 1. to develop Accepted and waiting to be taken care of labels Jan 9, 2023
@szaimen szaimen closed this as completed Mar 6, 2023
@skjnldsv skjnldsv moved this to Done in Files to vue Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: files needs info
Projects
Status: Done
Development

No branches or pull requests