-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Permalinks for folders and files that work across internal users when sharing #11732
Comments
For the design part, the question is where can the user get access to the permalink.
|
Not another action please. It will only confuse people about what it actually does.
Nope, same as above. Honestly copying the link/URL is fine in this case and is the thing which should be optimized. |
Ok, then option 4. is probably the best. |
Yes. That would make most sense! Very cool proposal! - I see a lot of very good use-cases for that. |
Note: would volunteer to implement this myself. |
What about the following use-case:
Now the user might assume that the link will still work, because the dummy variable shows the path to the latest version of the software. The link indeed still works, but now the people the link was originally shared with cannot reach the latest software. A kind of a solution would be to only include the folder name (without the full path) in the link. |
True, but there are use cases where even the target name might change. |
Another problem that it solves is that activities are pointing to specific folders, so when scrolling back in time one won't be able to directly access to files that might have been moved. If the activity app could provide such permalinks, renamed/moved files would still be accessible. |
There is definitely a use case for both, but which one should be the default? I'd say the permalink could be the default, with an option for absolute links. Not sure if @jancborchardt will be happy with two linking options in the UI though 😄 |
I would say the absolute linking with just a clear name is ok. If stuff is renamed, then it’s renamed. |
Found a few situations where the file id isn't stable: #13310 |
This seems like a good polishing item. @karlitschek curious your thoughts? |
Could be useful for the activity app to point to files even when they have been moved/renamed. |
Could be make to work with the trashbin as well in some cases: #11732 |
Note to self: file ids can be resolved to the current user's path using |
@karlitschek suggested at some point to reuse public link shares / tokens and then when you open the public link, if you're logged in, show the folder in your actual view (if you have access). Might be worth exploring this approach too. |
Thanks for all the comments. I think I'll go with the following:
Additional thoughts:
|
This feels really unintuitive - having two different URLs for the same stuff. I want to copy simply my address bar content and send it to someone (that is also how the sharing on mobile platforms from inside the browser work - they simply send the URL of the tab). cc @jancborchardt |
Agreeing with @MorrisJobke. I think it may be useful to just have the folder ID in the URL as well? Or maybe even only the folder ID? If somebody has an old link stored somewhere we would use the old logic, if somebody has a new link the new one :) |
Some reasons for why I like the separate URL (which is just a redirect):
The other part I like about the "http://localhost/owncloud/f/$fileId" is also that it opens up new possibilities:
I agree that it's not intuitive for people who are used to copy links. (note: I have the short link already implemented locally) |
Ah, and there's another problem with copying the URL from the browser: you cannot point directly at a file, only folders. |
Why not do it like Amazon? all URLs are valid:
(Bad example maybe with the umlaut, but at least you get an idea what the link is for.. especially when there are multiple in an e-mail or so) |
For now I intend to support both, the code addition is minimal. |
Okay. This means, that it is not a redirect, but simply shows the content. 👍 |
PR here (still WIP): #24434 I see additional tricky challenges with "fileid" in the regular URL:
|
At the moment it is a redirect to the correct folder (in case the folder changed name or so). |
Hmm looks like keeping this extra "fileid" argument up to date in the URL requires deeper changes in the JS code: Trying to find a way around this and limit regression risks. |
Okay, I found a way: #24434 (comment) Please try it out! |
Possible extensions:
|
@MTRichards @cmonteroluque @jospoortvliet @carlaschroder this feature was merged for 9.1 ! |
Congrats, this is very cool! |
Awesome! |
A nice addition would be to make it possible to request access to a file one doesn't have access to: #25317 This could happen if someone shared the permalink by email to lots of people. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
The main use case is being able to easily copy/paste/share links to any shared folder/subfolder/files inside of ownCloud between users, independently from their location.
Current problems with internal folder links
Paths inside links are not consistent across users.
In OC 6
Problem: for owner the path inside the link is "/test folder/subdir" but for any other user it's "/Shared/test folder/subdir".
In OC 7
Since OC 7 is is now possible for User2 to store "test folder" anywhere in their ownCloud, so the link "files?dir=Shared/test%20folder/subdir" will not work any more.
Problem: every user can potentially require a completely different path inside the links, and the target path is not predictable. It is not possible to paste a single link in a group email. You'd need to send an individual link to every one.
Extended use case
If User1 moved "subdir" to another location inside that share, the link will not be valid any more for neither User1 or User2.
Introducing permalinks
Concept
Currently, files and folders all have an internal file id which doesn't change most of the time (to be discussed).
The idea is to introduce a new format for link, with the form: "index.php/files?id=12345" where 12345 is the file id of the file or folder.
The workflow would be as follows:
If User1 moves "subdir" to another location inside of the "test folder" share, the folder will still be accessible with the link "index.php/files?id=12345".
For a file "coolfile.odt", the link would resolve to "index.php/files?dir=test%folder/subdir&scrollto=coolfile.odt" (for now, until we have direct links to files)
Possible extensions
The activity app, for example, could also make use of such permalinks to make sure
Potential problems
Link format not user readable
The link itself would not contain the file name/subdir any more but just the id, which is not user friendly as one cannot easily distinguish links. On the other hand: this is already how it's done for public links. Possible solution: add a dummy parameter in the link with the full path, but the parameter is ignored by the system.
Preserving the file id
We need to make sure that all file operations will preserve the file id.
I think this would be a nice improvement to solve the age-old question "how can I easily get a link to any folder inside ownCloud and share that link with other internal users ? (without having to fiddle with the URL...)"
@owncloud/designers @MTRichards @karlitschek @craigpg
@icewind1991 @schiesbn for file id questions
CC @LukasReschke
The text was updated successfully, but these errors were encountered: