Skip to content

Implement NewStreamingMultipartRequest #54

@djthorpe

Description

@djthorpe

NewStreamingMultipartRequest function that uses io.Pipe to encode multipart data concurrently with the HTTP upload:

Create io.Pipe() - PipeReader for HTTP body, PipeWriter for encoder
Spawn goroutine that encodes multipart data to PipeWriter
HTTP client reads from PipeReader as data is written
Use chunked transfer encoding (no Content-Length required)
This streams the file content directly from source → multipart encoder → HTTP upload without buffering.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions