Conversation
|
This skips S3 upload completely which does not fix #139. You can instead not configure S3, then there already will be no upload. My issue was about skipping upload of |
There was a problem hiding this comment.
Pull Request Overview
This PR adds an optional feature to skip S3 uploads of diff and output images when only the base image upload is needed. This provides more granular control over which files get uploaded to S3, potentially improving performance and reducing bandwidth usage.
- Added
uploadOnlyBaseImageparameter to control S3 upload behavior - Restructured upload logic to conditionally upload diff and output images
- Updated documentation to explain the new configuration option
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/index.ts | Added uploadOnlyBaseImage parameter and restructured S3 upload logic to conditionally skip diff/output uploads |
| README.md | Updated AWS configuration documentation to include the new uploadOnlyBaseImage option |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| fs.readFile(this._getBaseImagePath(baseImage, options), (err: any, data: any) => { | ||
| if (err) throw err; | ||
| else { | ||
| const base64data = new Buffer(data, "binary"); |
There was a problem hiding this comment.
The Buffer constructor is deprecated. Use Buffer.from(data, 'binary') instead for better security and compatibility.
|
|
||
| fs.readFile(this._getActualImagePath(baseImage), (err: any, data: any) => { | ||
| if (err) throw err; | ||
| const base64data = new Buffer(data, "binary"); |
There was a problem hiding this comment.
The Buffer constructor is deprecated. Use Buffer.from(data, 'binary') instead for better security and compatibility.
resolves #139