Compare commits

..

No commits in common. "267d0494d38fe892744354f379c66c6de0352f00" and "4f93db928f7260a58e04a3a07a02212eb6db5167" have entirely different histories.

4 changed files with 8 additions and 14 deletions

View File

@ -566,7 +566,7 @@ namespace IRaCIS.Core.API.Controllers
templateFileStream.Seek(0, SeekOrigin.Begin); templateFileStream.Seek(0, SeekOrigin.Begin);
var ossRelativePath = await oSSService.UploadToOSSAsync(fileStream, "InspectionUpload/Check", realFileName); var ossRelativePath = await oSSService.UploadToOSSAsync(fileStream, "InspectionUpload/Check", $"{Guid.NewGuid()}_" + realFileName);
await _repository.AddAsync(new InspectionFile() { FileName = realFileName, RelativePath = ossRelativePath, TrialId = trialId }); await _repository.AddAsync(new InspectionFile() { FileName = realFileName, RelativePath = ossRelativePath, TrialId = trialId });
@ -997,7 +997,7 @@ namespace IRaCIS.Core.API.Controllers
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_TemplateUploadData")); throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_TemplateUploadData"));
} }
var ossRelativePath = await oSSService.UploadToOSSAsync(fileStream, "InspectionUpload/SiteSurvey", realFileName); var ossRelativePath = await oSSService.UploadToOSSAsync(fileStream, "InspectionUpload/SiteSurvey", $"{Guid.NewGuid()}_"+ realFileName);
await _inspectionFileRepository.AddAsync(new InspectionFile() { FileName = realFileName, RelativePath = ossRelativePath, TrialId = trialId }); await _inspectionFileRepository.AddAsync(new InspectionFile() { FileName = realFileName, RelativePath = ossRelativePath, TrialId = trialId });

View File

@ -44,6 +44,7 @@
"secretKey": "l+yjtvV7Z4jiwm/7xCYv30UeUj/SvuqqYzAwjJHf", "secretKey": "l+yjtvV7Z4jiwm/7xCYv30UeUj/SvuqqYzAwjJHf",
"bucketName": "ei-irc-test-store", "bucketName": "ei-irc-test-store",
"viewEndpoint": "https://ei-irc-test-store.s3.amazonaws.com/" "viewEndpoint": "https://ei-irc-test-store.s3.amazonaws.com/"
} }
}, },

View File

@ -125,10 +125,7 @@ namespace IRaCIS.Core.Application.Helper
/// <returns></returns> /// <returns></returns>
public async Task<string> UploadToOSSAsync(Stream fileStream, string oosFolderPath, string fileRealName) public async Task<string> UploadToOSSAsync(Stream fileStream, string oosFolderPath, string fileRealName)
{ {
var ossRelativePath = oosFolderPath + "/" + fileRealName;
var ossRelativePath = $"{oosFolderPath}/{Guid.NewGuid()}_{fileRealName}";
//var ossRelativePath = oosFolderPath + "/" + fileRealName;
using (var memoryStream = new MemoryStream()) using (var memoryStream = new MemoryStream())
{ {
@ -207,9 +204,7 @@ namespace IRaCIS.Core.Application.Helper
{ {
var localFileName = Path.GetFileName(localFilePath); var localFileName = Path.GetFileName(localFilePath);
var ossRelativePath = $"{oosFolderPath}/{Guid.NewGuid()}_{localFileName}"; var ossRelativePath = oosFolderPath + "/" + localFileName;
//var ossRelativePath = oosFolderPath + "/" + localFileName;
if (ObjectStoreServiceOptions.ObjectStoreUse == "AliyunOSS") if (ObjectStoreServiceOptions.ObjectStoreUse == "AliyunOSS")

View File

@ -93,8 +93,6 @@ server:
user: root user: root
password: password:
from_secret: test_ssh_pwd from_secret: test_ssh_pwd
# ssh_key:
# from_secret: rsa_key
steps: steps:
- name: publish-test-irc - name: publish-test-irc