Don't miss out Virtual Happy Hour this Friday (April 26).
Try our conversational search powered by Generative AI!
AI OnAI Off
Don't miss out Virtual Happy Hour this Friday (April 26).
Do you create a writable clone of the page and saves it back to EPiServer?
The following code does what you want to do.
var page = CurrentPage.CreateWritableClone(); page.Property["ImageVaultImage"].Value = "/ImageVaultFiles/id_1/cf_2/Chrysanthemum.JPG?~1~Foo"; DataFactory.Instance.Save(page, SaveAction.Publish);The only way to store a file in ImageVault is by using IVDataFactory.UploadFile. Can you be more specific of what you are trying to do and maybe I can help.
I have 2 image vault questions, hope it is ok to post them here.
When I try to set the image property on a page (ImageVaultImage) programmatically I can see the image on the page, but it is not visible in edit mode. Can I set the property so that the image shows in the thumbnail in edit mode?
Page.Property["Image"].Value = pathToImageVaultImage;
How do you save an image to Image vault from an url? I have used the IVDataFactory.UploadFile, but it only takes HttpPostedFile and FileInfo.