Vulnerability in EPiServer.Forms
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.
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.
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 ?
The attribute ImageDescriptorAttribute has a property Pregenerated that you can set to true if you want the thumbnail to be created before first request.