Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Frends.AmazonS3.UploadObject/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## [3.3.0] - 2026-04-21
### Fixed
- Fixed missing BucketName/Key in abort cleanup, simplified loop to a single abort call, added throw to stop swallowing exceptions and set default multipart part size to 10 MB.

## [3.2.0] - 2025-12-29
### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ public class Connection
/// Recommended part sizes typically range from 10 MB to 100 MB for optimal performance.
/// </summary>
/// <example>10</example>
public long PartSize { get; set; }
[DefaultValue(10)]
public long PartSize { get; set; } = 10;

/// <summary>
/// Enable/disable an AWS S3 access control list.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Version>3.2.0</Version>
<Version>3.3.0</Version>
<Authors>Frends</Authors>
<Copyright>Frends</Copyright>
<Company>Frends</Company>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,28 +259,22 @@ private static async Task UploadMultipart(FileInfo file, Connection connection,
}
catch (Exception)
{
ListPartsRequest listPartsRequest = new()
{
UploadId = uploadRequest.UploadId
};

var listParts = await client.ListPartsAsync(listPartsRequest, cancellationToken);

while (listParts.Parts.Count > 0)
try
{
foreach (var part in listParts.Parts)
var abortMpuRequest = new AbortMultipartUploadRequest
{
AbortMultipartUploadRequest abortMpuRequest = new()
{
BucketName = input.BucketName,
Key = path,
UploadId = uploadRequest.UploadId
};
await client.AbortMultipartUploadAsync(abortMpuRequest, cancellationToken);
}
BucketName = input.BucketName,
Key = path,
UploadId = initResponse.UploadId
};

listParts = await client.ListPartsAsync(listPartsRequest, cancellationToken);
await client.AbortMultipartUploadAsync(abortMpuRequest, cancellationToken);
}
catch
{
// Swallow abort errors so the original exception is rethrown below.
}
throw;
Comment thread
MatteoDelOmbra marked this conversation as resolved.
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}

Expand Down
Loading