Skip to content

Uploading a file through an Express pass-through endoint #2030

Closed Answered by dglozic
dglozic asked this question in Q&A
Discussion options

You must be logged in to vote

Actually I think I fixed it. It looks like if I provide Express request as the 'body' in undiciOptions, this works fine as stream will treat this as a Readable:

		body: Readable.toWeb(options.request),

Another requirement is to provide a new dispatcher with strictContentLength: false passed into the Agent constructor. With these two changes, I can stream multipart file uploads using stream into the ultimate destination.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by dglozic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant