-
-
Notifications
You must be signed in to change notification settings - Fork 287
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
Cache mechanism for photos #1595
Comments
@g123k I don't think it's safe to use a temporary directory, as "Files in this directory may be cleared at any time." (it means: when other apps need space). You're not mentioning either the fact that some day we'll have to upload the pictures (and delete them). Or maybe there's confusion with #413 and #1593. I do think those are distinct issues:
|
Yes and no. On Android, it's only based on the user's decision. Also, after reading how Hive is implemented, it also uses Thanks for your feedback. This issue is indeed for #1593, as this cache is only temporary, whereas #413 is a long-living cache.
To summarize, this issue only consists in implementing a system to store temporary files while they're being uploaded. |
@g123k Thank you for your answer. I still don't agree on several points:
|
A PR #1600 is available with both short and long living cache storage. Hmmm I’m not sure to understand your last point. |
@g123k Actually you fixed both cases (cache and to-be-uploaded) in just one PR, so you can ignore my last point. |
What
If we migrate to a non-blocking uploading photo feature (#1593), we have to implement a local cache.
Indeed, if a photo is not yet sent to the server (offline mode for example), the user shouldn't be aware of that.
The change required here is basically to say:
The idea is to use this folder: https://pub.dev/documentation/path_provider/latest/path_provider/getTemporaryDirectory.html
When a new task is created, the photo is stored there and removed once the task is successful.
Part of
The text was updated successfully, but these errors were encountered: