oss板块
This commit is contained in:
+6
-3
@@ -59,11 +59,14 @@ public class OnboardingPublicSubmissionController
|
||||
[HttpPost("upload-material")]
|
||||
[Consumes("multipart/form-data")]
|
||||
[RequestSizeLimit(20 * 1024 * 1024)]
|
||||
public async Task UploadMaterial([FromForm] string token, [FromForm] long materialTypeId, IFormFile file)
|
||||
public async Task UploadMaterial(
|
||||
[FromQuery] string token,
|
||||
[FromQuery] long materialTypeId,
|
||||
[FromForm] IFormFile file)
|
||||
{
|
||||
if (file == null || file.Length == 0)
|
||||
{
|
||||
throw new ArgumentException("请选择需要上传的文件");
|
||||
throw Oops.Bah("请选择需要上传的文件");
|
||||
}
|
||||
|
||||
await _service.ValidateMaterialUpload(new OnboardingMaterialUploadValidationInput
|
||||
@@ -74,7 +77,7 @@ public class OnboardingPublicSubmissionController
|
||||
FileLength = file.Length
|
||||
});
|
||||
|
||||
var fileId = await _fileService.UploadFile(SysDictConst.FILE_ENGINE_LOCAL, file);
|
||||
var fileId = await _fileService.UploadFile(SysDictConst.FILE_ENGINE_ALIYUN_OSS, file);
|
||||
await _service.SaveMaterial(new OnboardingSaveMaterialInput
|
||||
{
|
||||
Token = token,
|
||||
|
||||
Reference in New Issue
Block a user