-
Notifications
You must be signed in to change notification settings - Fork 1
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
Syncing media with change file #254
Comments
Yeah, i will check what this actually looks like in the code . by default, we don't delete things, they go into the recycle bin, and umbraco doesn't remove things until the bin is empty. However - I appreciate this is different so i will take a look. |
@KevinJump the logic of removal of nodes is fine, there is the issue with removal of files attach, so yeah quite different, thanks for looking into it! |
Hey @KevinJump so any idea if we can fix this? |
so TLDR: - Yes, we can fix this, (and have a working branch, and nightly build if you want to try it). its a bit complicated, because the core bits of uSync which track the changes don't know about media files (they just know about properties and file hash values). and uSync.Complete doesn't know much more than the key and file name of the things its pushing. So - a bit hacky, we reach into the change details from the sync to get the old and new values of the if the old and new source values are different, then we mark the old value for deletion and then after we have imported all the new files we remove these files . I am, a little bit concerned that if this goes wrong for what ever reason we might remove media files that should be there, but i think it should be ok. |
what we might do is put this behind an option (which might well be on by default), so it can be turned off if it causes people issues. |
just tiding this up, we are going to have this off by default in v13 (don't want to issue a big breaking change to the 'stable' release. "AllowDeletingOfRenamedMediaFiles" e.g "uSync": {
"Publisher": {
"Settings": {
"IncomingEnabled": true,
"AllowDeletingOfRenamedMediaFiles": true,
"AppId": "[APP_ID]",
"AppKey": "[APP_KEY]"
}
}
} |
hey @KevinJump that's fine, i had opportunity to check it and all seems work as expected, awaiting the official build with new setting! :) |
Describe the bug
A clear and concise description of what the bug is.
Version (please complete the following information):
To Reproduce
Steps to reproduce the behavior:
Expected behavior
After syncing test1.pdf would be removed from blob storage
The text was updated successfully, but these errors were encountered: