Created
August 10, 2012 01:20
-
-
Save thefringeninja/3310050 to your computer and use it in GitHub Desktop.
Using Cassette.Nancy to reference image files
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
public class CassetteFileAccessConfiguration : IConfiguration<IFileAccessAuthorization> | |
{ | |
#region IConfiguration<IFileAccessAuthorization> Members | |
public void Configure(IFileAccessAuthorization configurable) | |
{ | |
configurable.AllowAccess(path => path.StartsWith("~/content/images")); | |
} | |
#endregion | |
} | |
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
<img src="@(Bundles.Helper.FileUrl("content/images/someimage.png"))" alt="Some Image" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment