var _mediaService = ApplicationContext.Current.Services.MediaService;
var media = _mediaService.GetById(4242);
var umbracoFilePath = media.GetValue<string>(Umbraco.Core.Constants.Conventions.Media.File);
var path = HttpContext.Current.Server.MapPath(JsonConvert.DeserializeObject<ImageCropDataSet>(umbracoFilePath).Src);
listOfAttachments.Add(new PerplexMail.Attachment(path));
7.14.0 Attachment Media crop bug ( with workaround )
Attactments with 7.14 not working error with crop
Exception: System.Web.HttpException (0x80004005): '~{"src": "/media/1350/1436-image.png", "crops": [ //{"alias": "Navigation","width": 200,"height": 200
I fixed it by doing the following
// Using direct filepath as workaround
is working on a reply...