owncloud / client

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

Sharing from Desktop: Files outside sync directories #2732

Open dragotin opened 9 years ago

dragotin commented 9 years ago

This is about a special case of Sharing from desktop as described here: https://github.com/owncloud/client/issues/1444

If the file to share is not within a shared dir on the desktop, we need special treatment. The way it was implemented so far in 95f7e83c5c567030ddda1052db0332d970fb5dbc is as follows: The file is copied to the root of a sync dir on the client. Once that is done, a sync starts to upload that file. When that is successful, the sharing dialog offers the chance to create the share link. That works nicely so far.

The case of worry now is: How do we find out to which local sync dir we will copy the file? There might be more than one. Currently, it uses this simple algorithm to find one: It checks for a sync folder with the default name ("ownCloud"). If that does not exist, it takes the first one from the list of configured sync folders instead.

Another edge case is that the sync folder might be different from the default to sync all, but just a sync of a read only shared resource. In that case we might not be allowed to add files locally. We can handle that.

Also note that this sharing of not yet synced files only works for files so far, not directories.

@MTRichards @jancborchardt opinions on this?

rullzer commented 9 years ago

Could we not make it configurable? So the user can select a directory in the config. If the user tries to share and no directory is configured we prompt for one.

ckamm commented 9 years ago

I've recently tried the 'share external file' functionality. It was not obvious to me that I'd be sharing a copy of the file. The wording in the share dialog ("registered file") suggested that the file itself was shared.

To make this more obvious I suggest that, for external files, nothing should be done until the share dialog has popped up. Then the user can press something like "copy & share". A second click is needed to enable sharing anyway, so delaying the copy until that time and telling the user about it makes sense.

And if that were done, selecting the target location of the to-be-shared file could be part of the share dialog.

Aside: Did you consider allowing in-place sharing of external files? It seems possible, although it'd have a couple of usability issues...

rullzer commented 9 years ago

@ckamm Well, this would have to be an extra dialog then. Since we cannot share a file that is not yet synced. But I like the idea.

How exactly would in-place sharing of external files work?

ckamm commented 9 years ago

@rullzer There are a couple of ways it could work. Maybe the one closest to the current approach would be allowing single-file sync 'folders': We can already map different directories of the owncloud storage to directories on the local disks. Similarly a file in OC storage could be mapped to a file locally.

There are a bunch of limitations and assumptions in the client about this, so it'd likely be a major effort to make it work. Also, you'd still need to generate a target path in owncloud for the file somehow.

jondo commented 9 years ago

I don't want to constrain your eagerness, but perhaps the decision of Dropbox not to offer sharing files outside already synced folders makes the most sense ...

moscicki commented 9 years ago

I also permit myself with a comment. I think that this is a really weird functionality which in addition uses some implicit assumptions (root folder, specific local sync folder, configuration etc) that will just confuse everyone. A user may copy a file to his sync folder in a place where he wants and then share it normally. Then he understands that he has made a copy of the file. He understands that the copy is synced. He knows where he puts the file. He may also choose to move the original file to the sync folder and not to do the copy.

I don't think a sync client should be implicitly replacing the desktop OS functionality... If convenience function comes with too much confusion then I don't think it is worth it.

ckamm commented 9 years ago

@jondo At this point I'm not at all saying we should do it. I'm saying I found the 'share external file by silent copy' behavior surprising and that it could be possible to share in-place. I agree that from a usability point of view having a clearly delimited sync folder that users need to copy things into explicitly is likely the most intuitive version.

guruz commented 9 years ago

I agree with @moscicki 's and @jondo 's view.

dragotin commented 9 years ago

Ok. You convinced me. I will disable the functionality of sharing "external" files. @danimo and @guruz pls. reflect that in the file manager plugins, I will care for nautilus.

jancborchardt commented 9 years ago

I’m glad to see by the way that we could solve the problem with the help of user feedback already. ;)