Change "umbracoFile" to the constant for this value

This commit is contained in:
Sebastiaan Janssen
2016-01-12 18:16:55 +01:00
parent ff83d2e1f4
commit 79cc4cd2fa

View File

@@ -136,13 +136,13 @@ namespace Umbraco.Web.Models.Mapping
} }
}; };
if (media.Properties.FirstOrDefault(x => x.Alias == "umbracoFile") != null) if (media.Properties.FirstOrDefault(x => x.Alias == Constants.Conventions.Media.File) != null)
{ {
var helper = new UmbracoHelper(UmbracoContext.Current); var helper = new UmbracoHelper(UmbracoContext.Current);
var mediaItem = helper.TypedMedia(media.Id); var mediaItem = helper.TypedMedia(media.Id);
if (mediaItem != null) if (mediaItem != null)
{ {
var crop = mediaItem.GetCropUrl("umbracoFile", string.Empty); var crop = mediaItem.GetCropUrl(Constants.Conventions.Media.File, string.Empty);
if (string.IsNullOrWhiteSpace(crop) == false) if (string.IsNullOrWhiteSpace(crop) == false)
{ {
var link = new ContentPropertyDisplay var link = new ContentPropertyDisplay