修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
1dd8515ac2
commit
b6bad061b7
|
|
@ -143,7 +143,7 @@ public enum ObjectStoreUse
|
|||
public interface IOSSService
|
||||
{
|
||||
public Task<string> UploadToOSSAsync(Stream fileStream, string oosFolderPath, string fileRealName, bool isFileNameAddGuid = true);
|
||||
public Task<string> UploadToOSSAsync(string localFilePath, string oosFolderPath, bool isFileNameAddGuid = true);
|
||||
public Task<string> UploadToOSSAsync(string localFilePath, string oosFolderPath, bool isFileNameAddGuid = true, bool randomFileName = false);
|
||||
|
||||
public Task DownLoadFromOSSAsync(string ossRelativePath, string localFilePath);
|
||||
|
||||
|
|
@ -322,9 +322,10 @@ public class OSSService : IOSSService
|
|||
/// <param name="localFilePath"></param>
|
||||
/// <param name="oosFolderPath"></param>
|
||||
/// <param name="isFileNameAddGuid"></param>
|
||||
/// <param name="randomFileName">随机文件名</param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||
public async Task<string> UploadToOSSAsync(string localFilePath, string oosFolderPath, bool isFileNameAddGuid = true)
|
||||
public async Task<string> UploadToOSSAsync(string localFilePath, string oosFolderPath, bool isFileNameAddGuid = true, bool randomFileName = false)
|
||||
{
|
||||
BackBatchGetToken();
|
||||
|
||||
|
|
@ -332,6 +333,11 @@ public class OSSService : IOSSService
|
|||
|
||||
var ossRelativePath = isFileNameAddGuid ? $"{oosFolderPath}/{Guid.NewGuid()}_{localFileName}" : $"{oosFolderPath}/{localFileName}";
|
||||
|
||||
if (randomFileName)
|
||||
{
|
||||
var fileExtension = localFileName.Split(".").LastOrDefault();
|
||||
ossRelativePath = $"{oosFolderPath}/{Guid.NewGuid()}.{fileExtension}";
|
||||
}
|
||||
|
||||
if (ObjectStoreServiceOptions.ObjectStoreUse == "AliyunOSS")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -262,6 +262,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
|
||||
result.VisitTaskNameList = data.VisitTaskList.Select(x => x.BlindName).ToList();
|
||||
|
||||
|
||||
|
||||
if (inDto.QuestionId != null)
|
||||
{
|
||||
var question = data.TaskQuestions.SelectMany(x => x.Childrens)
|
||||
|
|
|
|||
|
|
@ -340,7 +340,7 @@ namespace IRaCIS.Core.Application
|
|||
foreach (var item in systemCriterionKeyFile)
|
||||
{
|
||||
|
||||
var path= await oSSService.UploadToOSSAsync(item.FilePath, $"{trialCriterion.TrialId}/KeyFile", true);
|
||||
var path= await oSSService.UploadToOSSAsync(item.FilePath, $"{trialCriterion.TrialId}/KeyFile", true,true);
|
||||
|
||||
trialCriterionKeyFiles.Add(new TrialCriterionKeyFile
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue