OSS 稽查修改 ,新增健康检查
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
6e22515603
commit
d4a731d544
|
@ -800,7 +800,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
templateFileStream.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
|
||||
var ossRelativePath = oSSService.UploadToOSS(fileStream, "InspectionUpload/SiteSurvey", realFileName);
|
||||
var ossRelativePath = oSSService.UploadToOSS(fileStream, "InspectionUpload/Check", realFileName);
|
||||
|
||||
await _repository.AddAsync(new InspectionFile() { FileName = realFileName, RelativePath = ossRelativePath, TrialId = trialId });
|
||||
|
||||
|
|
|
@ -75,6 +75,8 @@ namespace IRaCIS.Core.API
|
|||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
//½¡¿µ¼ì²é
|
||||
services.AddHealthChecks();
|
||||
//±¾µØ»¯
|
||||
services.AddJsonLocalization(options => options.ResourcesPath = "Resources");
|
||||
|
||||
|
@ -242,6 +244,8 @@ namespace IRaCIS.Core.API
|
|||
endpoints.MapControllers();
|
||||
|
||||
endpoints.MapHub<UploadHub>("/UploadHub");
|
||||
|
||||
endpoints.MapHealthChecks("/health");
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -113,6 +113,14 @@ namespace IRaCIS.Core.Application.Helper
|
|||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// oosFolderPath 不要 "/ "开头 应该: TempFolder/ChildFolder
|
||||
/// </summary>
|
||||
/// <param name="fileStream"></param>
|
||||
/// <param name="oosFolderPath"></param>
|
||||
/// <param name="fileRealName"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||
public string UploadToOSS(Stream fileStream, string oosFolderPath,string fileRealName)
|
||||
{
|
||||
|
||||
|
@ -133,7 +141,7 @@ namespace IRaCIS.Core.Application.Helper
|
|||
}
|
||||
|
||||
|
||||
return ossRelativePath;
|
||||
return "/" + ossRelativePath;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -142,6 +150,13 @@ namespace IRaCIS.Core.Application.Helper
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// oosFolderPath 不要 "/ "开头 应该: TempFolder/ChildFolder
|
||||
/// </summary>
|
||||
/// <param name="localFilePath"></param>
|
||||
/// <param name="oosFolderPath"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||
public string UploadToOSS(string localFilePath, string oosFolderPath)
|
||||
{
|
||||
var localFileName = Path.GetFileName(localFilePath);
|
||||
|
|
Loading…
Reference in New Issue