Class PresignedUploadPartsRequest
- Namespace
- Cloudflare.NET.R2.Models
- Assembly
- Cloudflare.NET.R2.dll
Defines the parameters for creating a batch of presigned URLs for multiple parts of a multipart upload.
public record PresignedUploadPartsRequest : IEquatable<PresignedUploadPartsRequest>
- Inheritance
-
PresignedUploadPartsRequest
- Implements
- Inherited Members
Constructors
PresignedUploadPartsRequest(string, string, TimeSpan, IReadOnlyDictionary<int, long>, IReadOnlyDictionary<string, string>?, IReadOnlyDictionary<int, UploadChecksum>?)
Defines the parameters for creating a batch of presigned URLs for multiple parts of a multipart upload.
public PresignedUploadPartsRequest(string Key, string UploadId, TimeSpan ExpiresAfter, IReadOnlyDictionary<int, long> PartNumberAndLength, IReadOnlyDictionary<string, string>? HeadersToSign = null, IReadOnlyDictionary<int, UploadChecksum>? ChecksumsByPartNumber = null)
Parameters
KeystringThe object key (path).
UploadIdstringThe ID of the multipart upload.
ExpiresAfterTimeSpanThe duration for which the URLs will be valid.
PartNumberAndLengthIReadOnlyDictionary<int, long>A dictionary mapping each part number to its specific content length.
HeadersToSignIReadOnlyDictionary<string, string>An optional dictionary of additional headers to include in the signatures for all parts.
ChecksumsByPartNumberIReadOnlyDictionary<int, UploadChecksum>Optional digests to bind individual parts' bytes to, keyed by part number. Every part number used here must also appear in
PartNumberAndLength; a part without an entry gets no checksum header. Each digest's algorithm header is signed into that part's URL, the client must send it, and R2 rejects the part with 400BadDigest(recording nothing) when the arriving bytes do not hash to the stated digest. Only algorithms whose IsSupportedForPartUploads is true are accepted (Crc32, Crc32C, Md5): R2 answers 501NotImplementedto a part upload carrying a SHA-1 or SHA-256 checksum header, so URL generation refuses those up front.
Properties
ChecksumsByPartNumber
Optional digests to bind individual parts' bytes to, keyed by part number. Every part number used here must
also appear in PartNumberAndLength; a part without an entry gets no checksum header. Each
digest's algorithm header is signed into that part's URL, the client must send it, and R2 rejects the part
with 400 BadDigest (recording nothing) when the arriving bytes do not hash to the stated digest. Only
algorithms whose IsSupportedForPartUploads is true are
accepted (Crc32, Crc32C,
Md5): R2 answers 501 NotImplemented to a part upload carrying a
SHA-1 or SHA-256 checksum header, so URL generation refuses those up front.
public IReadOnlyDictionary<int, UploadChecksum>? ChecksumsByPartNumber { get; init; }
Property Value
ExpiresAfter
The duration for which the URLs will be valid.
public TimeSpan ExpiresAfter { get; init; }
Property Value
HeadersToSign
An optional dictionary of additional headers to include in the signatures for all parts.
public IReadOnlyDictionary<string, string>? HeadersToSign { get; init; }
Property Value
Key
The object key (path).
public string Key { get; init; }
Property Value
PartNumberAndLength
A dictionary mapping each part number to its specific content length.
public IReadOnlyDictionary<int, long> PartNumberAndLength { get; init; }
Property Value
UploadId
The ID of the multipart upload.
public string UploadId { get; init; }