Refactor: Unified Auto Upload Architecture#129
Open
PhilippThaler wants to merge 14 commits intoopencloud-eu:mainfrom
Open
Refactor: Unified Auto Upload Architecture#129PhilippThaler wants to merge 14 commits intoopencloud-eu:mainfrom
PhilippThaler wants to merge 14 commits intoopencloud-eu:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Built upon #56 and based on #124
So there aren't that many changes if #56 is merged first
Summary
This PR is mostly about refactoring the background workers to use a unified upload architecture. Instead of having "Picture" and "Video" logic hardcoded everywhere, the background sync is now entirely driven by the configuration itself.
This gives us a much cleaner foundation so we can eventually support custom folders and other features for auto uploading in the future.
While creating this, I also fixed a few edge cases, I ran into where settings would overwrite each other, or where files would end up in the wrong folder if you changed your settings while waiting for Wi-Fi.
What changed
How to test
• Turn on auto-uploads with subfolders, take a pic/video, and make sure it still works exactly like it did in Feature: Add Subfolder Strategy for Automatic Uploads #56. The unified logic shouldn't break anything.
• Turn on auto-uploads (Wi-Fi only) and turn off your Wi-Fi.
• Take a picture/video so it gets queued up.
• Go into the app settings and change the destination folder.
• Turn Wi-Fi back on.
• Verify: It should upload to the new folder, and the Uploads tab should update to show the new folder right as it starts.
• Set up both Picture and Video auto-uploads for the exact same local folder (e.g., /DCIM/Camera) but with different target folders on the server.
• Trigger an auto-upload.
• Verify: The picture and video configs should stay completely separate and not overwrite each other in the database anymore.
So this