Add forceSync option to auto-upload items
Sometimes files can get missed if they get marked as FILESYSTEM_FILE_SENT_FOR_UPLOAD but then do not get updated for whatever reason, as FilesystemDataProvider#getFilesForUpload only considers files where FILESYSTEM_FILE_SENT_FOR_UPLOAD=0. This change adds an explicit "Force sync" button which can be used to invalidate the client-side cache and re-enumerate all files in a given folder.
Screenshots:
- [x] Tests written, or not not needed
Hello there, Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.
Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6
Thank you for contributing to Nextcloud and we hope to hear from you soon!
(If you believe you should not receive this message, you can add yourself to the blocklist.)
Thank you very much for your contribution. I wonder what happens if the user has "what to do if file exists -> always ask" enabled and then force sync? It should then show n time a notification? This should ideally be not the case?
Thank you very much, this would be a really great feature to fix missing photos in auto upload!
I wonder what happens if the user has "what to do if file exists -> always ask" enabled and then force sync? It should then show n time a notification? This should ideally be not the case?
I think so, too. For those files that exist because of the forced sync it should not show a notification. But to get this feature out faster it would be OK to follow the setting if it is hard to implement to skip those files.
How is this handled when setting up a new auto upload folder with the "upload existing files too" toggle? Is it showing the notification in this case if a file exists already? Or is this case handled there already and the logic could be applied here, too?
This is extremely useful, I hope it will be merged soon.
I've been a bit busy lately, so didn't have much time for this, but I'm planning on following this up.
I wonder what happens if the user has "what to do if file exists -> always ask" enabled and then force sync? It should then show n time a notification? This should ideally be not the case?
I will need to test how the sync behaves with various options set to say for sure, but my assumption is that it should behave the same way as if you were setting up the folder for the same time. If that flow shows n notifcations as well, then this will too. For now, only "skip uploading" is tested, as that's the option I'm using.
I'd welcome suggestions on how to handle this. I have some ideas, but I don't really love any of them...
- "Foce-sync" could be disabled if the settings are not "optimal".
- The popup could have an "ignore notifications" chechbox. Not sure how difficult this would be to implement.
- The popup could offer the user to change the "existing file" behavior temproarily just for the duration of the "force sync" run. (This sounds best from UX POV, but not having experience with the codebase, I'm pretty afraid this is very complicated to implement. I don't know what to do about the transactionality of the folder settings, e.g. how to change one setting for a scheduled task, then guarantee to always revert it once the task is done, whatever "done" even means here...)
As a user, I would expect the same behavior that you get when you setup new synchronization, but choose already existing folder on server side.
Any updates on this? Got ~30 photos that didn't sync since July and cannot make auto upload upload them. Even removing the folder from auto upload and adding it again, telling it to upload existing images, does not make it work afaik.
@doits @Torbins
Hi
We’re currently working on improving the auto upload feature, and we’d love your help testing a new QA version. You can download it [here] and share your experience with us.
We’re aware of the current limitations with auto upload and explained the details [in this issue]. Rest assured, we’re actively working on making it more reliable.
It would also be very helpful if you could share the related logs with us. To do this, open Settings → Logs and filter using the keywords “AutoUpload” and “Upload.” You can then upload your logs [at this link].
I have completely messed up sync folders, that's exactly the feature I'm looking for