mirror of
https://github.com/yawaflua/yaflay.ru.git
synced 2026-02-04 19:04:12 +02:00
remove nonusable method
This commit is contained in:
@@ -177,25 +177,6 @@ namespace yaflay.ru.Новая_папка
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
[HttpGet("static/{file}")]
|
|
||||||
public HttpResponseMessage Generate(string file)
|
|
||||||
{
|
|
||||||
var stream = new MemoryStream();
|
|
||||||
// processing the stream.
|
|
||||||
|
|
||||||
var result = new HttpResponseMessage(System.Net.HttpStatusCode.OK)
|
|
||||||
{
|
|
||||||
Content = new ByteArrayContent(stream.ToArray())
|
|
||||||
};
|
|
||||||
result.Content.Headers.ContentDisposition =
|
|
||||||
new System.Net.Http.Headers.ContentDispositionHeaderValue("attachment")
|
|
||||||
{
|
|
||||||
FileName = $"wwwroot/static/{file}"
|
|
||||||
};
|
|
||||||
result.Content.Headers.ContentType =
|
|
||||||
new System.Net.Http.Headers.MediaTypeHeaderValue("application/octet-stream");
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user