Implemented the HashService and its service registration code
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using static LiteCharms.Features.Extensions.Hash;
|
||||
using LiteCharms.Features.Hasher;
|
||||
|
||||
namespace LiteCharms.Features.S3.Abstractions;
|
||||
|
||||
@@ -26,7 +26,7 @@ public abstract class S3ServiceBase(IAmazonS3 amazonS3)
|
||||
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
var fileHash = StreamToSha256Hash(stream);
|
||||
var fileHash = HashService.StreamToSha256Hash(stream);
|
||||
|
||||
if(string.IsNullOrWhiteSpace(fileHash))
|
||||
return Result.Fail<string>("Failed to compute file hash.");
|
||||
@@ -39,7 +39,7 @@ public abstract class S3ServiceBase(IAmazonS3 amazonS3)
|
||||
Key = fileKey,
|
||||
InputStream = stream,
|
||||
ContentType = contentType,
|
||||
UseChunkEncoding = false
|
||||
UseChunkEncoding = false,
|
||||
};
|
||||
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
Reference in New Issue
Block a user