-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Show progress when “downloading” a file #276
Comments
In order to show a download progress we need to provide an URLSessionDownloadTask to the FileProviderExtension. We already talked about some solutions in the past but I want to take the chance to share some thoughts about the (in my opinion) most likely one in public. We could modify the CloudProvider protocol in order to optionally get an URLSessionDownloadTask when starting a download. We need to make this optional since some providers like the LocalFileSystemProvider which we use for the LocalFileSystem and iCloud Drive (and maybe to access other file providers like SMB or 3rd party) rely on the FileManager which do not uses an URLSessionDownloadTask. But this comes with some serious refactoring in order to pass the task through the layers. And also getting the underlying URLSessionDownloadTask from the 3rd party SDKs could be not trivial. We could start with the WebDAVProvider since it's the one which we implemented by ourself and getting the URLSessionDownloadTask is indeed trivial and if I remember it correctly I already got the download progress working in a previous PoC. |
@phil1995 thank you for the reply. I don't know iOS development enough to try it myself, but would like to ask: for the providers that do not support |
We haven't found a way to create some sort of "fake" URLSessionDownloadTask which the FileProviderExtension actually accepted and read the progress in order to display it. I think the only way to support progress for those providers would be to use the NSReplicatedFileProviderExtension which has been introduced with iOS 16 and has a different API and does not need an URLSessionDownloadTask. However, as the API and behavior is different from the "normal" FileProviderExtension and relies a lot more on the WorkingSet and Push Notifications to notify the FileProviderExtension about changes on the cloud side, I wouldn't consider this as an option in the short term and further investigations are needed to check if it's feasible at all. Hope this adds some context to the whole problem of the download progress. One rather dirty workaround that came to my mind would be to add a custom option like "show download progress" as we have it for the manual retry failed upload. |
Fixed in #293. We're aware that only some cloud storage providers are supported at the moment but we will add support for other providers gradually (and create separate issues). |
Please agree to the following
Summary
Show progress in the iOS Files app while “downloading” a file
Motivation
Right now a spinning progress indicator is all that users get when “downloading” (download+decrypt) a large file off of a Cryptomator vault. This change should allow the user to see what Cryptomator is currently doing (is it downloading from the backend provider? Is it decrypting the file?), making the experience better for users by not having them guess and wait.
Considered Alternatives
No alternatives AFAIK
Anything else?
No response
The text was updated successfully, but these errors were encountered: