client: add multipart form-data support for file uploads (PRINFRA-121) - #6
Merged
somanshreddy merged 1 commit intoMar 31, 2026
Conversation
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Mar 31, 2026
somanshreddy
changed the base branch from
03-31-add_command.spec_command.invocation_types_generic_builder_refactor_executor
to
graphite-base/6
March 31, 2026 17:22
somanshreddy
force-pushed
the
03-31-client_add_multipart_form-data_file_upload_support
branch
from
March 31, 2026 17:22
47a5bd6 to
b1e332c
Compare
somanshreddy
force-pushed
the
graphite-base/6
branch
from
March 31, 2026 17:22
09b012f to
038909b
Compare
somanshreddy
changed the base branch from
graphite-base/6
to
03-31-cmd_add_generic_command_builder_for_generated_specs
March 31, 2026 17:22
This was referenced Mar 31, 2026
PRINFRA-121 CLI M1: OpenAPI codegen pipeline
Build the code generation pipeline that reads Scope
Mapping Rules
Acceptance Criteria
|
somanshreddy
force-pushed
the
03-31-cmd_add_generic_command_builder_for_generated_specs
branch
from
March 31, 2026 21:06
038909b to
1c8298f
Compare
somanshreddy
force-pushed
the
03-31-client_add_multipart_form-data_file_upload_support
branch
from
March 31, 2026 21:06
b1e332c to
3ddc75a
Compare
somanshreddy
force-pushed
the
03-31-cmd_add_generic_command_builder_for_generated_specs
branch
from
March 31, 2026 21:25
1c8298f to
d9d1b26
Compare
somanshreddy
force-pushed
the
03-31-client_add_multipart_form-data_file_upload_support
branch
from
March 31, 2026 21:25
3ddc75a to
1c9bc16
Compare
somanshreddy
force-pushed
the
03-31-cmd_add_generic_command_builder_for_generated_specs
branch
from
March 31, 2026 21:55
d9d1b26 to
6cdb863
Compare
somanshreddy
force-pushed
the
03-31-client_add_multipart_form-data_file_upload_support
branch
3 times, most recently
from
March 31, 2026 22:02
7c07ef5 to
aea9abd
Compare
somanshreddy
force-pushed
the
03-31-cmd_add_generic_command_builder_for_generated_specs
branch
from
March 31, 2026 22:02
6cdb863 to
8ff960a
Compare
somanshreddy
force-pushed
the
03-31-client_add_multipart_form-data_file_upload_support
branch
from
March 31, 2026 22:04
aea9abd to
7eff426
Compare
somanshreddy
marked this pull request as ready for review
March 31, 2026 22:07
jrusso1020
approved these changes
Mar 31, 2026
somanshreddy
force-pushed
the
03-31-client_add_multipart_form-data_file_upload_support
branch
from
March 31, 2026 22:34
7eff426 to
f9090ec
Compare
somanshreddy
force-pushed
the
03-31-cmd_add_generic_command_builder_for_generated_specs
branch
from
March 31, 2026 22:34
8ff960a to
836b5d0
Compare
Collaborator
Author
Merge activity
|
somanshreddy
changed the base branch from
03-31-cmd_add_generic_command_builder_for_generated_specs
to
graphite-base/6
March 31, 2026 22:42
The executor now handles BodyEncoding=="multipart" by reading the file from inv.FilePath and sending it as multipart/form-data. This enables the asset upload command (POST /v3/assets). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
somanshreddy
force-pushed
the
03-31-client_add_multipart_form-data_file_upload_support
branch
from
March 31, 2026 22:45
f9090ec to
1a210a7
Compare
somanshreddy
deleted the
03-31-client_add_multipart_form-data_file_upload_support
branch
March 31, 2026 22:47
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.

Description
Teaches the HTTP executor to handle file uploads. When a Spec has
BodyEncoding: "multipart", the executor reads the file fromInvocation.FilePath, wraps it in amultipart/form-databody, and sends it with the correct Content-Type boundary.This enables the
asset uploadcommand (POST /v3/assets), which is the only multipart endpoint in the HeyGen v3 API. Without this, the executor would reject multipart requests with a usage error.Error handling: missing file path and non-existent files both return clear error messages.
Testing
3 new tests: successful multipart upload (verifies server receives correct form data, filename, and content), missing file path error, non-existent file error. All using httptest with a temp file.
Files
internal/client/executor.go— multipart/form-data body constructioninternal/client/executor_test.go— upload, missing file, non-existent file tests