|
|
|
@ -14,6 +14,8 @@ using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using NPOI.XWPF.UserModel;
|
|
|
|
|
using Org.BouncyCastle.Ocsp;
|
|
|
|
|
using SharpCompress.Common;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Net;
|
|
|
|
|
|
|
|
|
|
namespace DS.WMS.OpApi.Controllers;
|
|
|
|
@ -288,12 +290,14 @@ public class SeaExportController : ApiController
|
|
|
|
|
var path = res.Data.FilePath;
|
|
|
|
|
var fileName = res.Data.FileName;
|
|
|
|
|
|
|
|
|
|
byte[] byteArr = System.IO.File.ReadAllBytes(res.Data.FilePath);
|
|
|
|
|
string mimeType = "application/octet-stream";
|
|
|
|
|
return new FileContentResult(byteArr, mimeType)
|
|
|
|
|
{
|
|
|
|
|
FileDownloadName = fileName
|
|
|
|
|
};
|
|
|
|
|
//byte[] byteArr = System.IO.File.ReadAllBytes(res.Data.FilePath);
|
|
|
|
|
//string mimeType = "application/octet-stream";
|
|
|
|
|
//return new FileContentResult(byteArr, mimeType)
|
|
|
|
|
//{
|
|
|
|
|
// FileDownloadName = fileName
|
|
|
|
|
//};
|
|
|
|
|
|
|
|
|
|
return new FileStreamResult(new FileStream(path, FileMode.Open), "application/octet-stream") { FileDownloadName = fileName };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|