Skip to content

Instantly share code, notes, and snippets.

@thefringeninja
Created August 10, 2012 01:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thefringeninja/3310050 to your computer and use it in GitHub Desktop.
Save thefringeninja/3310050 to your computer and use it in GitHub Desktop.
Using Cassette.Nancy to reference image files
public class CassetteFileAccessConfiguration : IConfiguration<IFileAccessAuthorization>
{
#region IConfiguration<IFileAccessAuthorization> Members
public void Configure(IFileAccessAuthorization configurable)
{
configurable.AllowAccess(path => path.StartsWith("~/content/images"));
}
#endregion
}
<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