Skip to content

Fix/cloudflare r2 skip checksum #3808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
3 changes: 1 addition & 2 deletions packages/publisher/s3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"repository": "https://github.com/electron/forge",
"author": "Samuel Attard",
"license": "MIT",
"main": "dist/PublisherS3.js",
"typings": "dist/PublisherS3.d.ts",
"main": "dist/PublisherS3.ts",
"devDependencies": {
"chai": "^4.3.3",
"mocha": "^9.0.1"
Expand Down
7 changes: 7 additions & 0 deletions packages/publisher/s3/src/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ export interface PublisherS3Config {
* Default: false
*/
s3ForcePathStyle?: boolean;

/**
* Whether to calculate checksums for uploaded files (Fix for Cloudflare R2)
*
* Default: false
*/
s3RequestChecksumCalculation?: 'WHEN_SUPPORTED' | 'WHEN_REQUIRED';
/**
* Custom function to provide the key to upload a given file to
*/
Expand Down
1 change: 1 addition & 0 deletions packages/publisher/s3/src/PublisherS3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export default class PublisherS3 extends PublisherStatic<PublisherS3Config> {
region: this.config.region,
endpoint: this.config.endpoint,
forcePathStyle: !!this.config.s3ForcePathStyle,
requestChecksumCalculation: this.config.s3RequestChecksumCalculation,
});

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