Server: Cannot upload empty folder via web interface

Created on 16 Oct 2018  ยท  29Comments  ยท  Source: nextcloud/server

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)

1. to develop bug files

Most helpful comment

Any news here? Nextcloud 16 still has this bug.

All 29 comments

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

Hi,

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

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

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

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

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.

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

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.

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..."

@Knot3n

@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).

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

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.

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).

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.

Any news here? Nextcloud 16 still has this bug.

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?

just confirmed with 17.0.1 and 18.0.0 Beta 2

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?

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!

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

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.

cc @nextcloud/server-triage

Any news about this problem?
In Nextcloud 19 it is still unable to drag-n-drop empty directory (tree) on Nextcloud Files!

@zpintar issue is still opened and set to 1. to develop

We can reproduce this problem in our team, using Nextcloud installed on a Ubuntu 16 dedicated. It's a big problem for recursive folder structures, please consider updating this issue.

Nextcloud 20.0.1 staill has this problem, I sync my joplin data, it has empty floder.

Nextcloud 20.0.2 still has this issue. This screws up many folder structures of mine.

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!

Was this page helpful?
0 / 5 - 0 ratings