Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public async Task ProcessPartAsync(
partNumber, offset);

// Write part data to file at the calculated offset
await WritePartToFileAsync(offset, response, cancellationToken)
await WritePartToFileAsync(partNumber, offset, response, cancellationToken)
.ConfigureAwait(false);

_logger.DebugFormat("FilePartDataHandler: [Part {0}] File write completed successfully",
Expand Down Expand Up @@ -192,6 +192,7 @@ private long GetPartOffset(GetObjectResponse response, int partNumber)
/// Writes part data from GetObjectResponse ResponseStream to the file at the specified offset.
/// </summary>
private async Task WritePartToFileAsync(
int partNumber,
long offset,
GetObjectResponse response,
CancellationToken cancellationToken)
Expand All @@ -213,7 +214,7 @@ private async Task WritePartToFileAsync(
// Seek to the correct offset for this part
fileStream.Seek(offset, SeekOrigin.Begin);

_logger.DebugFormat("FilePartDataHandler: Writing {0} bytes to file at offset {1}",
_logger.DebugFormat("FilePartDataHandler: [Part {0}] Writing {1} bytes to file at offset {2}", partNumber,
response.ContentLength, offset);

// Use GetObjectResponse's stream copy logic which includes:
Expand All @@ -232,7 +233,7 @@ await response.WriteResponseStreamAsync(
await fileStream.FlushAsync(cancellationToken)
.ConfigureAwait(false);

_logger.DebugFormat("FilePartDataHandler: Successfully wrote {0} bytes at offset {1}",
_logger.DebugFormat("FilePartDataHandler: [Part {0}] Successfully wrote {1} bytes at offset {2}", partNumber,
response.ContentLength, offset);
}
}
Expand Down
Loading