This commit is contained in:
parent
9c2caa3f4a
commit
2b000cbd69
5 changed files with 95 additions and 63 deletions
|
|
@ -72,14 +72,13 @@ namespace BMA.EHR.Recruit.Services
|
|||
{
|
||||
var id = Guid.NewGuid();
|
||||
file.CopyTo(ms);
|
||||
var fileBytes = ms.ToArray();
|
||||
System.IO.MemoryStream filestream = new System.IO.MemoryStream(fileBytes);
|
||||
ms.Position = 0; // Reset stream position for reading
|
||||
|
||||
var request = new PutObjectRequest
|
||||
{
|
||||
BucketName = _bucketName,
|
||||
Key = id.ToString("D"),
|
||||
InputStream = filestream,
|
||||
InputStream = ms,
|
||||
ContentType = file.ContentType,
|
||||
CannedACL = S3CannedACL.PublicRead
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue