Try our conversational search powered by Generative AI!

Update media deletes blobs

Vote:
 

Hi, 

I am having the issue described in the title. Here is what I am doing :

CommerceImage editableMediaData = (CommerceImage)((CommerceImage)resource).CreateWritableClone();

this.ContentRepository.Save(editableMediaData, SaveAction.Publish, AccessLevel.NoAccess);

If I take a look at the blobs of editableMediaData (BinaryData/LargeThumbnail) in between thoses lines, they are all set properly with the bytes setted when it was created.

After the save, only the BinaryData remains but the LargeThumnail is gone.

What am I missing ?

Thanks in advance.

#193536
Edited, May 30, 2018 20:40
Vote:
 

My memory is a bit rusty in this area, but I think that is the expected behavior. LargeThumbnail is generated on the fly for the first request, so updating your BinaryData means deleting your thumbnails - that's not a bug you're seeing. it's a feature.

#193537
May 30, 2018 21:07
Vote:
 

Thanks!

It is strange since providing the LargeThumnail works on creation. I also provide it for the update. Is there a way to customize the LargeThumbnail generation ?

#193538
May 30, 2018 21:39
Vote:
 

The attribute ImageDescriptorAttribute has a property Pregenerated that you can set to true if you want the thumbnail to be created before first request.

#193544
May 31, 2018 7:32
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.