Created
April 17, 2015 18:47
-
-
Save mskutta/dbaf9709e9415983af69 to your computer and use it in GitHub Desktop.
Loading a media item from a Sitecore field.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sitecore.Data.Fields.FileField file = item.Fields[<FieldName>]; | |
if (file != null) | |
{ | |
var mediaItem = file.MediaItem; | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment