Allow uploading folders on file-drop ("upload only") shares
Goal:
- Allow uploading folders on file drop shares with preserving their folder structure.
Technical goal:
- Allow MKCOL for public shares with only CREATE permissions and allow (only!) the current uploader to upload into that folder.
Problems:
- We must not leak information to that uploader that a similar named folder already existed when creating the folder (silently rename it on server side)
- We must ensure the uploader can only upload in folders created by them
Original report
Steps to reproduce
- create a folder with content on local drive (e.g. \folder\text.txt, \folder\folder\text.txt)
- create folder in NextCloud to share
- share folder externally (i.e. email address)
- adjust permission to "Upload Only"
- open link in browser
- drag&drop folder (step 0) into the browser window
- 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~ Ubuntu 22.04.4 LTS Web server: Apache 2 Database: mysql (mariaDB 11.4.2) PHP version: ~7.2.19~ 8.2.19 Nextcloud version: ~16.0.1~ 29.0.2 Where did you install Nextcloud from: ~nextcloudpi~ hub.docker.com Are you using encryption: no
Client configuration
Browser: Firefox ~67.0.1~ 126.0.1 (also tested on Microsoft Edge with similar result) Operating system: ~Windows 10 / Windows 7~ Windows 11
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)
EDIT: Still the same with NC24.0.6 EDIT: Still the same with NC27.1.7 EDIT: Still the same with NC28.0.3 EDIT: Still the same with NC28.0.6 (Nextcloud Hub 7) EDIT: Still the same with NC29.0.~1~2 (Nextcloud Hub 8)
When will this bug be finally fixed?! This is a major flaw limiting the use of shared folders!
+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 it does not only surprise "normal users", but also those running their own servers and thus having more technical background...
Any update on this? This was an issue for us as well, and I don't understand why this is the case since normal upload (so either on your own account or in a shared folder with "Allow upload and editing") allows uploading a folder structure. It should therefore be an easy fix, right?
Unfortunately not. Since this issue remains now since several versions of NC, I have sort of given up - although this is a really annoying problem and I cannot understand why this is not considered being a problem ... I agree, it feels like there should be a really easy fix.
I do not know where / how to get this noticed and actually worked on... So if anyone can assist with this, would be welcome!
cc @nextcloud/sharing does it make sense keeping the folder/files structure. for upload only folders?
@szaimen On the most basic level, if a user uploads a folder structure with two files that have the same name but are located in different folders, flattening the structure is causing data loss. (Apart from the fact that flattening file structure itself is data loss.)
cc @nextcloud/sharing does it make sense
keeping the folder/files structure.forupload onlyfolders?
As @despens commented, it is essential to keep the folder structure not to confuse with the contained files being automatically renamed. One cannot check from which subfolder the files originated from. This is an absolute no-go!
Actually I wonder how this can be considered not to be worth solving...
This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.
as now already a bot consideres this topic to be marked "stale", I wonder how it is possible to raise the awareness of the developers for this issue? I consider this a real issue that must be solved!
This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.
Leaving a message here to revive this issue, since also I would very much like to see it resolved
Hope this resolved soon i also need this and didn't find it when i needed it the most.
unfortunately this issue and bug report does not seem to be seen... If anyone has an idea how to get this issue to be realized as problematic, please comment!
same for me, I think it's a big problem not to keep the hierarchical directory structure. When you work in education and you ask for group work where each group turns in multiple documents, it's really unusable as it is.
I fully agree. For me this is a major issue and I am surprised that this is not being solved since 2.5 years now. I have identified the issue with NC16 already and it is still present in NC24.0.6 Does anyone know, how the developpers can be pointed towards this issue? I had hoped that opening an issue here would be the right place, but obviously this is not the case
@tjohs Perhaps you can write a post on their forum?
Had done this already... (actually this issue here was based on the suggestion of @JimmyKater )
https://help.nextcloud.com/t/files-drop-uploading-folders/54080/4
Coming here to let everyone know that uploading folders to a shared file drop directory still does not work in nextcloud 26.0.3. This is really weird, why even use different uploading mechanisms for logged-in and not logged-in users?
This is extremely annoying. Does anyone have an idea, how we finally can have this issue being seen by developers - and hopefully solved in the end?