Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust snippet for Swift multipart upload sample #7115

Merged
merged 2 commits into from
Nov 29, 2024
Merged
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 @@ -171,7 +171,6 @@ struct ExampleCommand: ParsableCommand {
} catch {
throw TransferError.signingError
}
// snippet-end:[swift.s3.presigned.presign-PutObject-advanced]

// Send the HTTP request and upload the file to Amazon S3.

Expand All @@ -180,6 +179,7 @@ struct ExampleCommand: ParsableCommand {
request.body = .bytes(fileData)

_ = try await HTTPClient.shared.execute(request, timeout: .seconds(5*60))
// snippet-end:[swift.s3.presigned.presign-PutObject-advanced]

print("Uploaded (presigned) \(sourcePath) to \(bucket)/\(fileName).")
}
Expand Down
Loading