migrate retirehistory
This commit is contained in:
parent
0bf0386863
commit
df9c2204d8
12 changed files with 12507 additions and 38 deletions
|
|
@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Hosting;
|
|||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using MimeTypes;
|
||||
using System.Net.Http.Headers;
|
||||
|
||||
namespace BMA.EHR.Application.Repositories
|
||||
|
|
@ -265,15 +266,15 @@ namespace BMA.EHR.Application.Repositories
|
|||
System.IO.MemoryStream filestream = new System.IO.MemoryStream(fileContents);
|
||||
//var fileNameWithoutExt = Path.GetFileNameWithoutExtension(fileName);
|
||||
var fileExt = Path.GetExtension(fileName);
|
||||
// var fileType = MimeTypeMap.GetMimeType(fileExt);
|
||||
var file_name = Path.GetFileName(fileName);
|
||||
var fileType = MimeTypeMap.GetMimeType(fileExt);
|
||||
// var file_name = Path.GetFileName(fileName);
|
||||
|
||||
var request = new PutObjectRequest
|
||||
{
|
||||
BucketName = $"{_bucketName}{subFolder}",
|
||||
Key = file_name,
|
||||
Key = fileName,
|
||||
InputStream = filestream,
|
||||
// ContentType = fileType,
|
||||
ContentType = fileType,
|
||||
CannedACL = S3CannedACL.PublicRead
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue