Pipe formdata ReadableStream from request directly into S3 on Deno #2569
Unanswered
alexgleason
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
My API has a
POST /api/v1/media
endpoint which accepts formdata, with a property calledfile
containing binary data of the file being uploaded.I would like to use
c.req.raw.body
, to pipe it through a transformer to get get thefile
property out of it, and then pass the transformed stream directly to S3. That way the file can be uploaded to S3 while the user is uploading it to Hono, instead of needing to put the entire file into memory first.Something like this:
What I am missing is a transform function for
FormDataStream
. Does something like this already exist?Beta Was this translation helpful? Give feedback.
All reactions