owncloud / client

🖥️ Desktop Syncing Client for ownCloud
GNU General Public License v2.0
1.4k stars 667 forks source link

Allow Sharing from the Desktop #1444

Closed MTRichards closed 8 years ago

MTRichards commented 10 years ago

As a user, I want to be able to click on a file, and select share with ownCloud, and then be able to share a file with someone as a link, or as a file shared directly with them in ownCloud using the share API.

This is partly a deeper integration into ownCloud and the desktop OS to enable the menu, and partly an implementation of the sharing API on the desktop. Likely there are two steps: 1) share with link (share, unshare) 2) share with user of the system (share, unshare, set CRUDS permissions)

jancborchardt commented 10 years ago

For reference: There were existing issues (#531, #634, #1431) which I closed in favor of this.

danimo commented 10 years ago

@MTRichards how does that fit with the fact that we share a single folder by default and sync it with the root? should the file be moved there?

MTRichards commented 10 years ago

If you own the file vs it is shared with you, the server dictates the response. Looking for a context menu to allow share from the desktop with a right click. Part 1 could be to share it with only files you own, vs part 2 with files owned by you and shared files where you are not the owner. Or did I miss something?

danimo commented 10 years ago

@MTRichards There are two different notions of "Share this file": Sharing a file/directory that already is within an ownCloud-synced folder, and one where a folder gets added to an ownCloud sync. Hence my confusion as to what should happen in the latter case.

MTRichards commented 10 years ago

Step one should be this only works inside the synced owncloud folders on the desktop. One cannot share files or folders from the desktop that are not already synced with the server via the client.

MU7L3Y commented 10 years ago

I agree. Sharing a file is only from the already synced owncloud folders, just like the web interface is. Step 2 would have to sync the folder/file first before allowing sharing context menu.

carlsondan commented 10 years ago

Yes, I agree. It would be great to be able to right click on a file in the synched folder and then be able to click on an option that says something like "Share OwnCloud link", which then copies a public URL link to the clipboard, where a user can either email, instant message, etc. to someone real quickly.

mczee commented 10 years ago

Please make this happen. Our users love working with ownCloud and the only thing they are REALLY missing in comparison to other services is the shell integration. Right-Click a file within the ownClound folder under windows to share a quickly generated link would be excellent. Direct copy to clipboard would be fine. There doesn't neccesarily have to be a context dialog. Also think about some tinyurl solution. (Maybe if the plugin is enabled?)

Science4583 commented 10 years ago

This is the only reason I don't use ownCloud. I really like how it works, but this is a deal breaker for me when it's easier to use Dropbox.

jancborchardt commented 10 years ago

As you can see in the infos to the right, this is currently scheduled for version 1.8 – currently scheduled for in about 2 months.

Science4583 commented 10 years ago

Well hot damn!

alefattorini commented 10 years ago

Why there is'nt any work on such feature, already present in other projects?

razyr commented 10 years ago

Aye, this is more than a "nice to have" when trying to get business users to adopt ownCloud vs one of the popular cloud file sharing apps. Very much looking forward to that 1.8 client.

jancborchardt commented 10 years ago

@alefattorini @razyr folks, focus is always on keeping things reliable. Thus fixes and stability improvements take priority over new features.

I’m excited about this as well though. ;)

guruz commented 10 years ago

@Azelphur is working on this feature. Depending on how things go this can be in 1.7 or 1.8..

Maybe @Azelphur can tease us with a screenshot here?

Azelphur commented 10 years ago

I can do better, I have a Python preview available, https://github.com/Azelphur/ownCloud-share-tools

Should work on any file browser that supports custom actions, so mostly Linux ones like Thunar, Nautilus and Dolphin.

I am working on porting it to C++ and integrating it for Mirall, at which point it hopefully will ship (ideally in either in 1.7 or 1.8 like @guruz says), at which point it will be cross platform.

The github page also has a rough screenshot of how things are going to look, although it's an outdated screenshot.

xpresservers commented 10 years ago

@Azelphur https://github.com/Azelphur/ownCloud-share-tools will this work on MacOS X Mavericks ?

Azelphur commented 10 years ago

xpresservers: it should work on any platform, all you need to do is run it with one argument, the full path to the file to share.

If you want file browser integration, your file browser needs to support custom actions (ie adding a new thing in the right click menu to run a command), most file browsers are able to do this.

Besides that I now have a build of Mirall up with some the sharing menu built in, however no file browser integration yet (so you still need custom actions for now if you decide to use it) https://github.com/Azelphur/mirall/tree/filebrowser_integration

mczee commented 10 years ago

Is this still on track for the planned 1.8 UI Enhancements release?

BeecherNetworks commented 9 years ago

I'd be interested in this too. This and deltas are my #1 needs for OwnCloud. I'd happily contribute to a bounty on this.

morty346 commented 9 years ago

PLEASE PLEASE PLEASE

sparkrisp commented 9 years ago

It will be a really good feature!

moscicki commented 9 years ago

@jancborchardt, @MTRichards : agreed. PLEASE first things first.

make the client very, very reliable, scaling to very large number of files, make sure there is no data loss under any circumstances, have the client journaling for recovery of user files in very large installations, resolve case clashes correctly, lift character restrictions for what can be synced, properly handle symlinks, handle locking on windows etc.

feature-wise and UI wise owncloud is ahead of anyone else. let's focus on the essentials.

jancborchardt commented 9 years ago

feature-wise and UI wise owncloud is ahead of anyone else. let's focus on the essentials.

@moscicki Thank you. And we will focus on the essentials.

@dahamsta @morty346 @sparkrisp This feature is something that @Azelphur is working on as volunteer contributor, so that’s great! Just all be patient – more comments don’t help more. ;)

guruz commented 9 years ago

@Azelphur Shall we cherry-pick your commit and try to fix it up?

Azelphur commented 9 years ago

@guruz probably a good idea, I've been having trouble finding the time to work on it. Flying out to California tomorrow which is where my boss is, so I'll get him to sign the developer agreement while I'm there.

IvoPereira commented 9 years ago

This would be an awesome feature! Looking forward to this.

pierrejochem commented 9 years ago

Me too :-)

kroko commented 9 years ago

yesterday installed ownCloud for the first time. effin great. and as for everybody - missing the contextual menus. oh well, behold mach_star and after 4 hours of messing around have come so far

first screen

there is a lot of going on now in my head as i haven't read any of ownCloud API docs yet and while coding the menus faced first issues:

http://cloud.mydomain.tld/index.php/apps/files/?dir=%2FSOMEFOLDER%2FSOME_FILE.ext

the URI parsing needs to be redone on the server side so that GET is "redirected" to JS and actual file is displayed in the browser. then there's another issue - what if it is a file that is "downloadable" by default, for example ZIP file? "opening" it means "downloading it", not what we want when just asking to show the file. thus resumēē > GET rerouting in server has to be done in such a manner that

so my work on view on ownCloud item has to stop here.

i believe i use the same method as dropbox as they also have mach_inject_bundle_stub under /Library/DropBoxHelperTools

please comment on this. i will upload the code on github as soon as possible.

need some sleep.

dragotin commented 9 years ago

@kroko awesome, here are some comments:

First and foremost, there is a thing called SocketAPI. This is an API in mirall that the overlay icon plugin already uses to get information about files from the running client. We were planing to enhance that for the context menu functions such as sharing. So you should not have to implement stuff like config file reading etc.pp. We prefer to do that in mirall because we have the cross platform story, and we try to keep the part of platform depending stuff at a minimum, just that much that is needed to do the menu for example.

For that, we would cleanly define the primitives that we need in mirall, ie. Share file foo/bar. Mirall will receive this primitive and open the dialog and talk to the ownCloud server etc.

So what the platform specific part needs to do is reusing the socket that is opened by the overlay part (hopefully that works on all platforms) and send a primitive like "SHARE:/path/to/file".

Do you agree?

kroko commented 9 years ago

i do agree.

spent a bit time on this today.

menu as in owncload directory first screen

menu everywhere else first screen

checked as working on 10.7 and 10.10. i develop on 10.7., built against 10.7 SDK and 10.7 as min deployment.

thus, for the brave ones download >> https://warp.wetransfer.com/downloads/9ac6743a940cf566a314060505e8ebef20141211221355/833f15662999381f80be7eefaddf2e9520141211221355/16ed12 (hehe pardon, our owncloud is messed now because of tests)

and execute

unzip Release.zip && cd Release && sudo ./FinderOwnCloudInject

to stop simply restart finder

killall Finder
Bridgesltd commented 9 years ago

Hi Guys, I know its not really constructive, but just wanted to show my support by saying this would really be a game changer for us as well.

Our users are lazy and do not like the fact they have to login to the web UI to simply share a link.

We are all windows users here, so will sit patiently watching this space :)

rullzer commented 9 years ago

I made some more modifications to the brach of @Azelphur. It is far from complete. It is now more of an extention that shows an extra widget that lists all the shares. https://github.com/rullzer/client/tree/desktop_share All feedback welcome.

There are some design choices that might need adressing:

  1. If we chose to share a file/folder what do we expect to see? If the file is already shared with some people etc how do we display that?

I would suggest a complete window. There you can multiple users/groups etc. Revoke sharing with user/groups etc. This could then also be used from the application window. Instead of listing each share multiple times if it is shared multiple times.

  1. Maybe we should also have an API to get all the users/groups so we can do auto completion. Else sharing with users is pretty user unfriendly. We should probably get the server involved here. Maybe first focus on link sharing?
  2. A SocketAPI call SHARE_LINK. That get the share link for a file/folder. If there is no share link yet create one.
Azelphur commented 9 years ago

@rullzer it should be relatively close to complete, iirc all I had left to do was error checking and the actual file browser integration, and some general tidying up.

The design is already done, and design wise it's exactly how Jan said it should be so there shouldn't be much to change there.

  1. Is already done to my knowledge, if you choose to share a file it should open the dialog and show you the status of the file in a dialog, the dialog is designed to be almost identical to what you'd see in the web panel

2nd 1. I asked for this, and yea at the moment it's pretty unfriendly. It would be nice to have this feature :)

  1. I was planning to do this, it's a good idea, should be fairly easy to implement as all the code to create a share link is already done
rullzer commented 9 years ago

@Azelphur, I agree that most is done for a first release. But I was thinking more in line of future work. For example now it is kind of a one share firts all solution. But in the web interface we have much more fine grained access control for different users, groups etc. It would be nice to have to functionality in the client as well.

However that might be something for a future release.

rullzer commented 9 years ago

O and for completion this is the work on sharing via the SocketAPI: https://github.com/rullzer/client/tree/filebrowser_integration

The other branch is for more share control from the client. But lets first get this to work :)

Azelphur commented 9 years ago

@rullzer sounds good!

You should also be aware there's a bug in the OCS Share API, when you call the API for setting a password, it destroys and recreates the share which changes its ID. There's a issue open somewhere but I can't seem to find it.

dragotin commented 9 years ago

@rullzer would you mind to create a submit request against owncloud/client master branch? That would be nice.

dragotin commented 9 years ago

I merged the branch of @rullzer today (thanks!) and adopted the Nautilus plugin accordingly, so that sharing from Linux Nautilus is possible now.

Remaining tasks:

rullzer commented 9 years ago

Public url sharing should be working pretty OK in that merge.

However sharing with users and groups (and modifying access) is still under development. I'll hopefully submit a patch for that soon. Then somebody can play with making it look decent.

rullzer commented 9 years ago

I just created another pull request https://github.com/owncloud/client/pull/2700 This allows user/group sharing. Still not complete. But maybe somebody can have a look at the UI already :)

jancborchardt commented 9 years ago

@rullzer awesome! Some feedback regarding the sharing dialog:

alefattorini commented 9 years ago

@jancborchardt can I help? How can I test this dev version on my ubuntu?

jancborchardt commented 9 years ago

@rullzer @dragotin @guruz basically what I’m saying is that maybe it’s wiser to start with only the »Share by link« feature in the dialog, and postpone the sharing to other users. Until we have the proper API to return users from the server.

Bridgesltd commented 9 years ago

completely agree with @jancborchardt comments above. It would likely be easier to implement the whole sharing feature by keeping it simple first and then expanding on to users / groups.

rullzer commented 9 years ago

@jancborchardt @Bridgesltd That was my idea as well initially. But then I went ahead and started implementing the rest as well. So I guess the best way for now is to just go ahead and remove all the user/group stuff. At least from the UI.

So we indeed need to get the server involved. Since right now we need two lines (one to share with group and one to share with user). Since they are different share types. So we do not get an auto complete list from the server we will not know what type of share to create.

I'll branch of my current work and create a version that only shares a link. Hopefully there will be yet another pull request soon ;)

P.s. I rebase all my branches on master. However I made a pull request to the Sharedialog branch. So that most likely makes merging less trivial...

jancborchardt commented 9 years ago

@rullzer cool, great stuff! :) Yeah, sometimes we have to see what’s feasible to include in a next release.

We for sure want to include the sharing with users/groups in the future, but we need to have it polished for that. :)

rullzer commented 9 years ago

Ok so more commits are done :).

So please test and review the branch.

dragotin commented 9 years ago

@rullzer for tests, I use netcat, nc, ie. nc -U /run/user/1000/ownCloud/socket which opens the socket API, and that allows to send commands to it via commandline. Very convenient.

dragotin commented 9 years ago

Also to be considered here: https://github.com/owncloud/client/issues/2732