Server: Uploading Folders into shared "upload only" folders flattens hierarchy

Created on 11 Jun 2019  路  3Comments  路  Source: nextcloud/server

Steps to reproduce

  1. create a folder with content on local drive (e.g. \folder\text.txt, \folder\folder\text.txt)
  2. create folder in NextCloud to share
  3. share folder externally (i.e. email address)
  4. adjust permission to "Upload Only"
  5. open link in browser
  6. drag&drop folder (step 0) into the browser window
  7. files are uploaded (text.txt, text (2).txt)

Expected behaviour

Within the "shared folder" the dragged folder should be created, keeping the folder/files structure.

Actual behaviour

No folder is created. Only the contained files are uploaded. Files within different subfolders will be uploaded into the same "shared folder", folder hierarchy is not kept, files (from subfolders) that are already existing in the "shared folder" will be renamed "filename (2)"...
This can lead to useless uploads: assuming system backups of similar but not identical systems. They share same configuration file names but different content. If now the hierarchy is flattened while \System1\Conf\config.ini and \System2\Conf\config.ini are uploaded, the "shared folder" will contain "config.ini" and "config (2).ini", but you would not know which file belongs to which system backup...
This is only one of an endless variation of scenarios.

Server configuration

Operating system: Debian 9
Web server: Apache 2
Database: mysql
PHP version: 7.2.19
Nextcloud version: 16.0.1
Where did you install Nextcloud from: nextcloudpi
Are you using encryption: no

Client configuration

Browser: Firefox 67.0.1 (also tested on Microsoft Edge with similar result)
Operating system: Windows 10 / Windows 7

Conclusion

The option to share folders with colleagues/customers to simply upload files/folders is nice, but the described behaviour leads to useless data.
An alternative to creating folders as I would have expected would be to automatically create ZIPs upon uploading named as the folder(s)

0. Needs triage bug

Most helpful comment

+1 , normal users do not understand why this is not working as expected. They say: "It just works on webservice XY"

All 3 comments

+1 , normal users do not understand why this is not working as expected. They say: "It just works on webservice XY"

There is even more weird things going on when uploading a folder with sub-folders in chrome: the sub-folder appears in nextcloud as a zip file if there are conflicting names!

:confused:

+1 , normal users do not understand why this is not working as expected. They say: "It just works on webservice XY"

:-) I think does does not only surprise "normal users", but also those running their own servers and thus having more technical background...

Was this page helpful?
0 / 5 - 0 ratings