Class CloudUploadSession
The server-issued facts about a direct-to-cloud upload, carried in a tamper-proof token so later calls in the same upload cannot change them.
Why this exists. The presign flow is several requests: create, sign
parts, complete, abort. Only create chooses the object key; every later call
receives the key and upload id from the client. Without binding, a caller can
send any key it likes and have parts presigned for it, or complete and abort uploads
it did not start because nothing ties those values to the session the server
actually opened.
When RequireSignedCloudSessions is enabled the token is mandatory and the values inside it replace whatever the client sent, so a lying client cannot redirect the upload.
Inherited Members
Namespace: CoreUpload.Security
Assembly: CoreUpload.dll
Syntax
public sealed class CloudUploadSession
Properties
DeclaredSize
The size declared at create time, so a later call cannot inflate it.
Declaration
public long DeclaredSize { get; init; }
Property Value
| Type | Description |
|---|---|
| long |
ExpiresAt
Absolute expiry. Sessions are short-lived by design.
Declaration
public DateTimeOffset ExpiresAt { get; init; }
Property Value
| Type | Description |
|---|---|
| DateTimeOffset |
Key
The object key the server chose. Never taken from the client once bound.
Declaration
public string Key { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
UploadId
The provider's upload/session id (S3 uploadId, GCS session, Azure blob).
Declaration
public string UploadId { get; init; }
Property Value
| Type | Description |
|---|---|
| string |