Skip to content
Open
Show file tree
Hide file tree
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
32 changes: 32 additions & 0 deletions packages/publisher/s3/src/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,38 @@ export interface PublisherS3Config {
* Default: false
*/
s3ForcePathStyle?: boolean;
/**
* Controls whether checksums are calculated for requests sent to S3.
*
* Possible values:
* - "WHEN_SUPPORTED" - Calculate checksums for all requests
* - "WHEN_REQUIRED" - Only calculate checksums when required by the service
*
* See:
* https://github.com/aws/aws-sdk-js-v3/blob/main/packages/middleware-flexible-checksums/src/constants.ts
*
* Default: "WHEN_SUPPORTED"
*/
requestChecksumCalculation?:
| import('@aws-sdk/middleware-flexible-checksums').RequestChecksumCalculation
| import('@aws-sdk/types').Provider<import('@aws-sdk/middleware-flexible-checksums').RequestChecksumCalculation>
| undefined;
/**
* Controls whether checksums in responses from S3 are validated.
*
* Possible values:
* - "WHEN_SUPPORTED" - Validate checksums for all responses
* - "WHEN_REQUIRED" - Only validate checksums when provided by the service
*
* See:
* https://github.com/aws/aws-sdk-js-v3/blob/main/packages/middleware-flexible-checksums/src/constants.ts
*
* Default: "WHEN_SUPPORTED"
*/
responseChecksumValidation?:
| import('@aws-sdk/middleware-flexible-checksums').ResponseChecksumValidation
| import('@aws-sdk/types').Provider<import('@aws-sdk/middleware-flexible-checksums').ResponseChecksumValidation>
| undefined;
/**
* Custom function to provide the key to upload a given file to
*/
Expand Down
2 changes: 2 additions & 0 deletions packages/publisher/s3/src/PublisherS3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ export default class PublisherS3 extends PublisherStatic<PublisherS3Config> {
region: this.config.region,
endpoint: this.config.endpoint,
forcePathStyle: !!this.config.s3ForcePathStyle,
requestChecksumCalculation: this.config.requestChecksumCalculation || ('WHEN_SUPPORTED' as const),
responseChecksumValidation: this.config.responseChecksumValidation || ('WHEN_SUPPORTED' as const),
});

d('creating s3 client with options:', this.config);
Expand Down