Search Results for

Show / Hide Table of Contents

# Interface IS3Signer

Bridges CoreUpload to an S3-compatible multipart upload session. The core library takes no AWS SDK dependency — host apps plug in their own signer by registering an implementation with DI:

    builder.Services.AddSingleton<IS3Signer, MyS3Signer>();

Works for any S3-API-compatible backend (AWS S3, MinIO, Backblaze B2, Cloudflare R2, Wasabi, etc.). When no IS3Signer is registered, the `/s3/*` endpoints respond with `501 Not Implemented`.

###### Namespace: CoreUpload.Providers

###### Assembly: CoreUpload.dll

##### Syntax

    public interface IS3Signer

### Methods

#### AbortMultipartUploadAsync(S3AbortRequest, CancellationToken)

Aborts an in-progress multipart upload so S3 discards any uploaded parts. Called on cancel or fatal error.

##### Declaration

    Task AbortMultipartUploadAsync(S3AbortRequest request, CancellationToken cancellationToken = default)

##### Parameters

Type | Name | Description
--- | --- | ---
S3AbortRequest | request |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
Task |

#### CompleteMultipartUploadAsync(S3CompleteRequest, CancellationToken)

Finalises the multipart upload (S3 `CompleteMultipartUpload`) and returns metadata the client should treat as the uploaded file.

##### Declaration

    Task<S3CompleteResult> CompleteMultipartUploadAsync(S3CompleteRequest request, CancellationToken cancellationToken = default)

##### Parameters

Type | Name | Description
--- | --- | ---
S3CompleteRequest | request |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
Task<S3CompleteResult> |

#### CreateMultipartUploadAsync(S3CreateRequest, CancellationToken)

Initiates a multipart upload. Returns the S3 `uploadId` and the chosen object key. Implementations choose the bucket + key and typically call `IAmazonS3.InitiateMultipartUploadAsync`.

##### Declaration

    Task<S3CreateResult> CreateMultipartUploadAsync(S3CreateRequest request, CancellationToken cancellationToken = default)

##### Parameters

Type | Name | Description
--- | --- | ---
S3CreateRequest | request |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
Task<S3CreateResult> |

#### ListPartsAsync(S3ListPartsRequest, CancellationToken)

Lists the parts S3 has actually stored for an in-progress multipart upload (S3 `ListParts`), so a resuming client can reconcile its persisted part map instead of trusting it blindly. Default returns null ("not supported") so existing signer implementations keep compiling; the endpoint then reports `supported: false` and the client falls back to its local state.

##### Declaration

    Task<S3ListPartsResult?> ListPartsAsync(S3ListPartsRequest request, CancellationToken cancellationToken = default)

##### Parameters

Type | Name | Description
--- | --- | ---
S3ListPartsRequest | request |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
Task<S3ListPartsResult> |

#### SignPartsAsync(S3SignRequest, CancellationToken)

Presigns one or more `UploadPart` URLs for direct browser PUTs. URLs should be short-lived (5–15 min). Return a map keyed by part number.

##### Declaration

    Task<S3SignResult> SignPartsAsync(S3SignRequest request, CancellationToken cancellationToken = default)

##### Parameters

Type | Name | Description
--- | --- | ---
S3SignRequest | request |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
Task<S3SignResult> |