feat: add response header overrides for downloads#136
Open
goanpeca wants to merge 3 commits into
Open
Conversation
|
Build artifact for this PR: |
There was a problem hiding this comment.
Pull request overview
This PR adds support for overriding download response headers (Content-Disposition, Content-Type, Cache-Control) via new action inputs, wiring them through both direct downloads and presigned URLs (including the download-authorization request and the resulting URL query params).
Changes:
- Introduces new inputs (
content-disposition,response-content-type,cache-control) and parses them intoParsedInputs. - Threads these overrides into
download(SDKbucket.downloadoptions) andpresign(download authorization + appended query params on the presigned URL). - Updates documentation, action metadata, tests, and the committed
dist/bundle.
Reviewed changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/inputs.ts | Adds parsed inputs for response header overrides. |
| src/download-overrides.ts | Centralizes mapping from inputs → SDK override options and URL query params. |
| src/commands/presign.ts | Includes overrides in b2_get_download_authorization and appends them to presigned URLs. |
| src/commands/download.ts | Passes overrides through to bucket.download() calls. |
| action.yml | Documents the new inputs on the action surface. |
| README.md | Documents new inputs and updates the presign download example. |
| tests/inputs.test.ts | Adds coverage for parsing the new inputs. |
| tests/commands/upload-download.test.ts | Verifies download calls receive the override options. |
| tests/commands/delete-copy-presign.test.ts | Verifies presign auth request + URL query params include overrides. |
| tests/_parsed-inputs.ts | Updates test helper defaults for the expanded ParsedInputs shape. |
| dist/index.js | Updates bundled output to match the new source behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Build artifact for this PR: |
6f1b839 to
127d408
Compare
|
Build artifact for this PR: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
response-content-disposition,response-content-type, andresponse-cache-controlinputs for presign/download response header overrides.Linked issue
Tests run
Follow-up notes