修改一版
This commit is contained in:
@@ -468,10 +468,10 @@ namespace IRaCIS.Core.API.Controllers
|
||||
/// <returns></returns>
|
||||
[HttpPost("TaskMedicalReview/UploadMedicalReviewImage/{trialId:guid}/{taskMedicalReviewId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
public async Task<IResponseOutput> UploadMedicalReviewImage(Guid trialId, Guid taskMedicalReviewId)
|
||||
public async Task<IResponseOutput<FileDto>> UploadMedicalReviewImage(Guid trialId, Guid taskMedicalReviewId)
|
||||
{
|
||||
string path = string.Empty;
|
||||
|
||||
FileDto fileDto = new FileDto();
|
||||
await FileUploadAsync(async (fileName) =>
|
||||
{
|
||||
|
||||
@@ -480,16 +480,18 @@ namespace IRaCIS.Core.API.Controllers
|
||||
|
||||
await _repository.UpdatePartialFromQueryAsync<TaskMedicalReview>(x => x.Id == taskMedicalReviewId, x => new TaskMedicalReview()
|
||||
{
|
||||
ImagePath = relativePath
|
||||
ImagePath = relativePath,
|
||||
FileName=fileName,
|
||||
});
|
||||
|
||||
path = relativePath;
|
||||
|
||||
return serverFilePath;
|
||||
fileDto.Path = relativePath;
|
||||
fileDto.FileName = fileName;
|
||||
return serverFilePath;
|
||||
});
|
||||
|
||||
await _repository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok(path);
|
||||
return ResponseOutput.Ok(fileDto);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user