Table of Contents

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

Key string

The object key (path).

UploadId string

The ID of the multipart upload.

ExpiresAfter TimeSpan

The duration for which the URLs will be valid.

PartNumberAndLength IReadOnlyDictionary<int, long>

A dictionary mapping each part number to its specific content length.

HeadersToSign IReadOnlyDictionary<string, string>

An optional dictionary of additional headers to include in the signatures for all parts.

ChecksumsByPartNumber IReadOnlyDictionary<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 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.

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

IReadOnlyDictionary<int, UploadChecksum>

ExpiresAfter

The duration for which the URLs will be valid.

public TimeSpan ExpiresAfter { get; init; }

Property Value

TimeSpan

HeadersToSign

An optional dictionary of additional headers to include in the signatures for all parts.

public IReadOnlyDictionary<string, string>? HeadersToSign { get; init; }

Property Value

IReadOnlyDictionary<string, string>

Key

The object key (path).

public string Key { get; init; }

Property Value

string

PartNumberAndLength

A dictionary mapping each part number to its specific content length.

public IReadOnlyDictionary<int, long> PartNumberAndLength { get; init; }

Property Value

IReadOnlyDictionary<int, long>

UploadId

The ID of the multipart upload.

public string UploadId { get; init; }

Property Value

string