Created
August 17, 2018 14:28
-
-
Save spboyer/bef0c1d0639871ae425de5a427e6fa00 to your computer and use it in GitHub Desktop.
azure cdn image tag helper
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
if (AppendVersion) | |
{ | |
EnsureFileVersionProvider(); | |
Src = output.Attributes[SrcAttributeName].Value as string; | |
// Check if the CDN Base URI is set and add to the src attribute | |
if (!string.IsNullOrWhiteSpace(CdnUri)) | |
{ | |
output.Attributes.SetAttribute(SrcAttributeName, string.Format("{0}{1}", CdnUri, _fileVersionProvider.AddFileVersionToPath(Src))); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment