|
|
@ -2739,7 +2739,18 @@ namespace _24Hour.Controllers.Common |
|
|
|
#endregion |
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
#region 文件上传 |
|
|
|
#region 文件上传 |
|
|
|
|
|
|
|
[HttpPost] |
|
|
|
|
|
|
|
[Route("RequestDownloadFile")] |
|
|
|
|
|
|
|
public IActionResult RequestDownloadFile(string filename) //[FromBody] dynamic Json |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var FileName = System.IO.Path.GetFileName(filename); |
|
|
|
|
|
|
|
var currentDate = DateTime.Now; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var FilePath = filename; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new FileStreamResult(new FileStream(FilePath, FileMode.Open), "application/octet-stream") { FileDownloadName = FileName }; |
|
|
|
|
|
|
|
} |
|
|
|
private string[] AllowedExtensions = new string[] { ".png", ".jpg", ".jpeg", ".bmp",".xlsx",".aks"}; |
|
|
|
private string[] AllowedExtensions = new string[] { ".png", ".jpg", ".jpeg", ".bmp",".xlsx",".aks"}; |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// 文件上传--附件 |
|
|
|
/// 文件上传--附件 |
|
|
|