Browse Source

non-existent oss-objects should return null

5.0.0-rc.2
cKey 4 years ago
parent
commit
9927399527
  1. 2
      aspnet-core/modules/oss-management/LINGYUN.Abp.BlobStoring.OssManagement/LINGYUN/Abp/BlobStoring/OssManagement/OssManagementBlobProvider.cs
  2. 2
      aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Components/LINGYUN/Abp/WorkflowCore/Components/Primitives/SendEmail.cs
  3. 2
      aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/appsettings.Development.json

2
aspnet-core/modules/oss-management/LINGYUN.Abp.BlobStoring.OssManagement/LINGYUN/Abp/BlobStoring/OssManagement/OssManagementBlobProvider.cs

@ -73,7 +73,7 @@ namespace LINGYUN.Abp.BlobStoring.OssManagement
Logger.LogWarning("An error occurred while getting the OSS object and an empty data stream will be returned");
Logger.LogWarning(ex.Message);
return Stream.Null;
return null;
}
}

2
aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Components/LINGYUN/Abp/WorkflowCore/Components/Primitives/SendEmail.cs

@ -74,7 +74,7 @@ namespace LINGYUN.Abp.WorkflowCore.Components.Primitives
foreach (var attachment in attachments)
{
var stream = await _blobContainer.GetOrNullAsync(attachment);
if (stream != null)
if (stream != null && stream != Stream.Null)
{
mailMessage.Attachments.Add(new Attachment(stream, Path.GetFileName(attachment)));
}

2
aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/appsettings.Development.json

@ -46,7 +46,7 @@
"HostName": "127.0.0.1",
"Port": 5672,
"UserName": "admin",
"Password": "662874",
"Password": "123456",
"VirtualHost": "/"
}
},

Loading…
Cancel
Save