ios icon indicating copy to clipboard operation
ios copied to clipboard

Download files for offline access

Open kojid0 opened this issue 2 years ago • 10 comments

Please agree to the following

Summary

Add an option to download files/folders for offline access

Motivation

In case of slow or no internet, a function to access the files offline is very handy. The files should be encrypted when the vault is locked.

Considered Alternatives

No response

Anything else?

No response

kojid0 avatar Dec 31 '21 16:12 kojid0

I have the same problem. I downloaded the files to access them offline, but the problem is that the files are loading and not working. I checked on the desktop version, and it works without problems. It would be great to have such a feature to access the files in offline mode.

idcristi avatar Feb 01 '22 17:02 idcristi

I think this would be the way:

Motivation Vaults are mostly stored online which is quite nice because you've on all device the same state. But while on traveling (or anywhere else in the world with a bad connection) you can't access them. It would be nice if you cold add an option for a local stored copy of the online vault. Which is updating frequently or on demand (best like an rsync ;) ).

Considered Alternatives My actual doing. Deleting the local vault, copy the existing vault to local. But since this is a manual doing it always takes time.

Marcusg562 avatar Jul 26 '22 13:07 Marcusg562

We've actually explored this option recently and it's actually more challenging than we thought. We thought about adding a "simple" offline access as we did in the old iOS app. Basically, giving the possibility to access the vault contents through the cache that we have. And to make it "simple", it has to be in read-only mode. Because if we'd allow write access as well, we'd immediately get into trouble with two-way syncing, which is a very complex and hard problem.

But our prototype didn't quite behave as we wanted with this "read-only" mode, when the device is offline. It's hard to get it right in the Files app, without making it unusable. That's the current blocker and we don't have a solution for this yet.

tobihagemann avatar Jul 26 '22 13:07 tobihagemann

@tobihagemann how would be without a sync and just a download/copy within the App? So for example you add a button in the app for a manual copy to the phone. You can specify an additional offline storage in the app. Especially on iOS you could choose between your Phone and the iCloud. So each Vault you choose will be located in this folder. In case you wanna update the local fault, you perform a delete of the files and download it new again. Not a real sync but at least a possibility to download selected vaults easily.

Marcusg562 avatar Jul 26 '22 17:07 Marcusg562

Curious what sort of support there is under the hood for the cloud providers.

For example, I can choose to "Make available offline" files in Dropbox, but I get a "Content unavailable" error when trying to open files on a Cryptomator vault when I don't have Internet.

iCloud Drive "just works", allowing me to open and unlock a vault when offline and will upload the changes when Internet connectivity is restored.

nferch avatar Nov 16 '22 19:11 nferch

iCloud Drive "just works", allowing me to open and unlock a vault when offline and will upload the changes when Internet connectivity is restored.

iCloud Drive is special because it actually uses the "local filesystem API", i.e. the FileManager, which masks the whole online / offline thing away from us. Therefore, it just works as we don't do additional reachability checks for detecting a missing internet connection.

Actually if some other cloud provider like Dropbox decides to support folder enumeration with their FileProviderExtension in the futures it would be the same. But to be honest I don't think this will happen since this API was not really designed for cloud providers (and is also completely undocumented!).

Therefore, I still think we need to handle this some time in the future but as @tobihagemann already said it's quite complex to get this right.

phil1995 avatar Nov 22 '22 18:11 phil1995

[...]

Actually if some other cloud provider like Dropbox decides to support folder enumeration with their FileProviderExtension in the futures it would be the same. But to be honest I don't think this will happen since this API was not really designed for cloud providers (and is also completely undocumented!).

Therefore, I still think we need to handle this some time in the future but as @tobihagemann already said it's quite complex to get this right.

Makes sense, definitely appreciate the complexity in figuring this out, both from the UX and implementation standpoint.

FWIW my use cases are currently very small files, so having the app syncing a tarball of a Vault seems like it would work, as other apps that handle single files with Dropbox seem to work ok.

nferch avatar Nov 22 '22 19:11 nferch

iCloud Drive "just works", allowing me to open and unlock a vault when offline and will upload the changes when Internet connectivity is restored.

@nferch - How were you able to get iCloud Drive to "just work", out of curiosity?

I have a vault in iCloud Drive and downloaded the full vault through the iCloud section of the files app while online. However when later offline and trying to view a file in the Cryptomator section of the files app, an error dialog saying "You're offline" prevents me from viewing any files (even though I downloaded the full vault already through the iCloud section) and can open the encrypted files in the iCloud section of the files app.

wittymap avatar Nov 27 '22 20:11 wittymap

@wittymap I suspect the difference between our usages is that I created the vault using the iOS app, choosing iCloud drive as the storage. So it appears with the cloud icon in the Cryptomator vault list.

I can access the decrypted files in the Files app under "Locations", which shows the Cryptomator vault, which in turn provides access to the files.

nferch avatar Nov 28 '22 15:11 nferch

It’s a pity this seems to be such a hard nut to crack. To me it appears to be a critical feature. While read-only would already be a very nice step forward, even a two-way sync would seem worthwile pursuing (I would be willing to pay for such an upgrade). However being off-network (eg on a plane or a ferry) and not having access to any files at all is a total bummer for everyday use.

soberdor avatar May 29 '23 18:05 soberdor