D
Deno

help

Anyone aware of a streaming multipart parser for Deno?

MGMark G2/9/2024
I'd like to handle the parts of a multipart/form-data stream in a server as they arrive rather than waiting for a complete upload and using FormData. Ideally this would be a TransformStream that parsed the body into a stream of parts, which in turn contained the appropriate metadata and a content stream for each part. I've been searching for any kind of implementation like this and not found anything from the wider JS ecosystem, let alone for Deno. Does anyone else know of something like this, or maybe a nice multipart parser that could be adapted? I wanted to avoid duplicating effort, but if it's not already been done, I may have a bash at it myself.
DAHDeno AI Helper2/9/2024
I wasn't able to find the answer to your question in the official Deno documentation. However, based on your message, I didn't spot any obvious syntax errors or mistakes in your description of what you're looking for. Your idea of a TransformStream to parse multipart/form-data as it arrives is quite specific, and it's possible that such a utility may not exist yet in the Deno ecosystem. If you decide to implement this functionality yourself, it could be a valuable contribution to the community. Please note that this advice is not based on the Deno documentation, and I recommend double-checking the accuracy of the advice given. If you do end up creating a streaming multipart parser, you might consider sharing it with the Deno community or contributing to an existing project that could benefit from such a feature. Good luck with your project!

Looking for more? Join the community!