Support non-image files#313
Merged
gregberge merged 1 commit intoMay 28, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
382f751 to
eaa246d
Compare
6 tasks
There was a problem hiding this comment.
Pull request overview
This PR updates @argos-ci/core to use secure S3 presigned POST uploads for snapshots and Playwright traces, while keeping the existing PUT helper for deployment uploads.
Changes:
- Sends
screenshots: [{ key, contentType }]to create builds instead ofscreenshotKeys. - Adds multipart POST upload support with presigned fields and uses it for snapshots/traces.
- Refreshes API client schema and test mocks for the new create-build upload contract.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
packages/core/src/upload.ts |
Switches snapshot/trace uploads to secure presigned POST inputs. |
packages/core/src/upload.test.ts |
Adds coverage for secure screenshot upload request and multipart form fields. |
packages/core/src/skip.ts |
Updates skipped-build creation to use screenshots: []. |
packages/core/src/s3.ts |
Adds presigned POST multipart upload helper. |
packages/core/src/s3.test.ts |
Updates S3 helper tests for both PUT and POST upload paths. |
packages/core/mocks/handlers/uploadScreenshot.ts |
Changes upload mock from PUT to POST multipart validation. |
packages/core/mocks/handlers/createBuild.ts |
Updates create-build mock to return POST upload fields. |
packages/api-client/src/schema.ts |
Regenerates schema for secure uploads and related API changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
createBuildcontract:screenshots: [{ key, contentType }]POSTfields, appending the file part lastpostUrl+fieldsWhy
The API now signs uploads with S3 POST policies instead of presigned PUT URLs. This lets S3 enforce upload constraints directly, including content type and size policy. The SDK needs to send content types when creating a build and then perform multipart POST uploads using the returned policy fields.
Validation
pnpm --dir packages/core run check-typespnpm --dir packages/core testpnpm --dir packages/api-client run check-typesgit diff --check