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

Uploading Folders into shared "upload only" folders flattens hierarchy #15921

Open
tjohs opened this issue Jun 11, 2019 · 34 comments
Open

Uploading Folders into shared "upload only" folders flattens hierarchy #15921

tjohs opened this issue Jun 11, 2019 · 34 comments

Comments

@tjohs
Copy link

tjohs commented Jun 11, 2019

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)

EDIT: Still the same with NC24.0.6
EDIT: Still the same with NC27.1.7
EDIT: Still the same with NC28.0.3

@tjohs tjohs added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jun 11, 2019
@stleitner
Copy link

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

@despens
Copy link

despens commented Aug 12, 2019

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!

😕

@tjohs
Copy link
Author

tjohs commented Aug 12, 2019

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

@stefandesu
Copy link

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?

@tjohs
Copy link
Author

tjohs commented Jan 13, 2021

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!

@szaimen
Copy link
Contributor

szaimen commented Jun 22, 2021

cc @nextcloud/sharing does it make sense keeping the folder/files structure. for upload only folders?

@despens
Copy link

despens commented Jun 22, 2021

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

@tjohs
Copy link
Author

tjohs commented Jun 22, 2021

cc @nextcloud/sharing does it make sense keeping the folder/files structure. for upload only folders?

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

@ghost

This comment was marked as resolved.

@ghost ghost added the stale Ticket or PR with no recent activity label Jul 22, 2021
@tjohs

This comment was marked as resolved.

@ghost ghost removed the stale Ticket or PR with no recent activity label Jul 23, 2021
@ghost

This comment was marked as resolved.

@ghost ghost added the stale Ticket or PR with no recent activity label Aug 22, 2021
@ghost ghost closed this as completed Sep 5, 2021
@rolfheij

This comment was marked as duplicate.

@Karem-sobhy

This comment was marked as duplicate.

@tjohs

This comment was marked as duplicate.

@julpec
Copy link

julpec commented Jan 9, 2023

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.

@tjohs
Copy link
Author

tjohs commented Jan 10, 2023

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

@rolfheij
Copy link

@tjohs Perhaps you can write a post on their forum?

@tjohs
Copy link
Author

tjohs commented Jan 10, 2023

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

@despens
Copy link

despens commented Jul 20, 2023

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?

@tjohs

This comment was marked as duplicate.

@despens

This comment was marked as resolved.

@labor4

This comment was marked as duplicate.

@labor4 labor4 reopened this Jul 20, 2023
@despens
Copy link

despens commented Jul 20, 2023

Happy belated 4th birthday to this issue! 🥳

@tjohs
Copy link
Author

tjohs commented Jul 24, 2023

let's hope this finally get's solved ;)
thanks @labor4 to have checked this and reopened this issue

@stefandesu

This comment was marked as resolved.

@szaimen szaimen added enhancement and removed bug needs info stale Ticket or PR with no recent activity labels Jul 24, 2023
@despens
Copy link

despens commented Jul 24, 2023

@szaimen I want to suggest to leave the tag "bug" on this issue, since this behavior is causing data loss. This is not about enhancing nextcloud with some fancy new feature, like transcoding videos on upload or similar, it is about preventing data loss when files are uploaded to a file sharing service, where the user is given no clue that the upload was corrupted. Maybe a "data loss" tag would be useful in general?

Here is a video of what happens in nextcloud 26.0.3 when a folder is uploaded via a file drop share link:

upload.mp4

Any sub-folder structure is not preserved. Instead, files are being randomly renamed if there is a name conflict, and their context is lost. Which license.txt now belongs to what javascript file? Which print-instructions.txt belongs to which Indesign file?

The user-facing upload process gives no indication that the context was lost or that files were renamed.

This is serious, and actually worse than if nextcloud just prevented drop uploads of folders alltogether.

@szaimen
Copy link
Contributor

szaimen commented Jul 24, 2023

Cc @nextcloud/designers @nextcloud/server-frontend

@marcoambrosini
Copy link
Member

I also think this is a bug. This behaviour is confusing and misleading. If we allow uploading of folders there, folder structure should be preserved.

@skjnldsv skjnldsv added 1. to develop Accepted and waiting to be taken care of feature: sharing feature: files and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Aug 2, 2023
@skjnldsv skjnldsv added this to Legacy bugs in Files to vue via automation Aug 2, 2023
@skjnldsv skjnldsv added bug and removed enhancement labels Aug 2, 2023
@Adenosintriphosphate
Copy link

Just wanted to mention that the hierarchy is also flattened when uploading on android. So maybe this sits deeper?

@stleitner

This comment was marked as duplicate.

@fizux

This comment was marked as duplicate.

@ReAVRafalSztaba

This comment was marked as spam.

@astrojuanlu
Copy link

hey folks I don't know how the NC team prioritizes issues but please instead of leaving "any updates" comments, upvote the issue by reacting with 👍 on the first comment and optionally subscribe.

This is basic open source netiquette but basically if you don't see any updates, probably there aren't any updates, so no need to ask. There are lots of folks subscribed to this thread so every comment triggers a notification, please avoid that.

Peace and love ❤️

@susnux
Copy link
Contributor

susnux commented Mar 28, 2024

@astrojuanlu yes thank you!
Please upvote issues with the 👍 reaction on the initial post so we see what is the most important issue for the community to fix or feature to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Files to vue
  
Legacy bugs
Development

No branches or pull requests