Jumoo / uSync.Complete.Issues

Public Issue tracker and roadmap for uSync.Complete
https://jumoo.co.uk/usync/complete/
2 stars 1 forks source link

uSync pushes 0byte media if it fails to read the source media #236

Open ctolkien opened 1 month ago

ctolkien commented 1 month ago

Umbraco LTS, uSync.Complete latest.

Describe the bug

A developer working locally, pushed content to another destination server. That worked as expected, however the content referenced media that the developer did not have on their local machine. All the referenced media was overwritten on the destination with 0 byte files.

Expected Behaviour

An error, probably. Or a warning that the content was pushed, but the media failed to read? We did not expect it to overwrite the destination media with 0 bytes, effectively corrupting them.

(Our devs often work without the entire media available locally due to the size)

This may be compounded by using Azure blob as the file system (both locally, via emulator and as the destination server).

KevinJump commented 1 month ago

Hi,

Yeah in theory i think there might be ways to do that with publisher, but i am not sure if we don't have some things where we expect the media items to always be pushed.

You could,

1. turn of media pushing as part of a server config. (server advanced tab)

image

this will mean that when you push content the media files won't be pushed - any references in content will remain, so if the content does exist on the target site it will work.

however if its a new bit of content then the media item won't be creared in the media section.

2. use exporter to create a n export of all the media references but not the files.

if include media files is unticked image

then when you create an export of media it will just contain the uSync folder with the media config (not the media files). - if you open the syncpack file (it's a zip) you will see it only contains a uSync folder and not a media one

then it would be your responsibility to get the actuall media files there (which is what you want?) and uSync would copy the media configs via the export.