Skip to content

Instantly share code, notes, and snippets.

@terjetyl
Created January 15, 2012 21:52
Show Gist options
  • Save terjetyl/1617605 to your computer and use it in GitHub Desktop.
Save terjetyl/1617605 to your computer and use it in GitHub Desktop.
Make dll downloadable
public FileStreamResult Download()
{
var fullQualifiedPathToDll = Path.Combine(Server.MapPath("~/"), "bin/ImageResizer.dll");
var fileInfo = new FileInfo(fullQualifiedPathToDll);
var myFileStream = new FileStream(fullQualifiedPathToDll, FileMode.Open);
return File(myFileStream, "application/octet-stream", fileInfo.Name);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment