Developer Forum »
Easy way to copy a file
62 posts

What is the best way to copy a single file from one fileproperty to another? (and keep the original file)

 

181 posts

Hi!

This can be done like this:

 var source = WAFContext.Engine.SystemSession.GetContent(146);
 var destination = WAFContext.Engine.SystemSession.GetContent(137);
 destination.IngressImage.SetFile(source.IngressImage.GetFileData(),source.IngressImage.FileName + source.IngressImage.FileExtension);
 destination.UpdateChanges();
1