I am using a FileTable
in SQL Server 2012 and I want my users to download files from the FileTable
. What path should I use?
public ActionResult DownloadFile(string filename)
{
//string filename = Request.QueryString["MOVIE_FILE"];
string path = "\\Maaz-laptop\\mssqlservermaaz\\FileDBFileStreamDirectory\\FileDirectory";
Response.ContentType = "application/force-download;";
Response.AppendHeader("Content-Disposition", "attachment; filename=" + filename);
Response.WriteFile(Server.MapPath(path) + filename);
Response.End();
return null;
}