diff --git a/src/SIL.Machine.AspNetCore/Services/S3FileStorage.cs b/src/SIL.Machine.AspNetCore/Services/S3FileStorage.cs index 9058da211..ff8563a42 100644 --- a/src/SIL.Machine.AspNetCore/Services/S3FileStorage.cs +++ b/src/SIL.Machine.AspNetCore/Services/S3FileStorage.cs @@ -88,7 +88,7 @@ public override async Task OpenWrite(string path, CancellationToken canc InitiateMultipartUploadResponse response = await _client.InitiateMultipartUploadAsync(request); return new BufferedStream( new S3WriteStream(_client, objectId, _bucketName, response.UploadId, _loggerFactory), - S3WriteStream.FiveMB + S3WriteStream.MaxPartSize ); } diff --git a/src/SIL.Machine.AspNetCore/Services/S3WriteStream.cs b/src/SIL.Machine.AspNetCore/Services/S3WriteStream.cs index 339ca3a26..fc2173053 100644 --- a/src/SIL.Machine.AspNetCore/Services/S3WriteStream.cs +++ b/src/SIL.Machine.AspNetCore/Services/S3WriteStream.cs @@ -9,7 +9,7 @@ public class S3WriteStream : Stream private readonly List _uploadResponses; private readonly ILogger _logger; - public const int FiveMB = 5 * 1024 * 1024; + public const int MaxPartSize = 5 * 1024 * 1024; public S3WriteStream( AmazonS3Client client, @@ -67,7 +67,7 @@ public override async Task WriteAsync(byte[] buffer, int offset, int count, Canc UploadId = _uploadId, PartNumber = partNumber, InputStream = ms, - PartSize = FiveMB + PartSize = MaxPartSize }; request.StreamTransferProgress += new EventHandler( (_, e) => diff --git a/src/SIL.Machine.AspNetCore/Services/SharedFileService.cs b/src/SIL.Machine.AspNetCore/Services/SharedFileService.cs index 5804584c1..cef73bbeb 100644 --- a/src/SIL.Machine.AspNetCore/Services/SharedFileService.cs +++ b/src/SIL.Machine.AspNetCore/Services/SharedFileService.cs @@ -1,6 +1,4 @@ -using SIL.Reporting; - -namespace SIL.Machine.AspNetCore.Services; +namespace SIL.Machine.AspNetCore.Services; public class SharedFileService : ISharedFileService {