public override IDictionary <string, object> GetSerializedValue() { //generate an id if we need one if (MediaId == Guid.Empty) { MediaId = Guid.NewGuid(); } return(ContentExtensions.WriteUploadedFile(MediaId, RemoveFile, NewFile, _hive, Value, PreValueModel.Sizes)); var img = Image.FromStream(NewFile.InputStream); }