Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] raw body can't give Symbol when content type is multipart/form-data #234

Open
3 tasks
changchanghwang opened this issue Dec 6, 2023 · 0 comments
Open
3 tasks
Labels

Comments

@changchanghwang
Copy link
Contributor

changchanghwang commented Dec 6, 2023

Describe the bug

Node.js version:
18.x

OS version:
m1 mac

Description:

ctx.request.body[unparsed] give me undefined when content-type is multipart/form-data
How can i get raw data from multipart/form-data?

Actual behavior

console.log(ctx.request.body) // {.path:'hi' } <- i send this too with file. but there is no Symbol even i set `includeUnparsed: true, nmmultipart: true`
console.log(ctx.request.files) // { file: PersistentFile } <- i send this file
console.log(ctx.request.body[unparsed] // nothing. but if content-type is `application/json`, it works properly

Expected behavior

i want to access to content of form data (include both files and text i send) for proxy
how to get the stream?

Code to reproduce

Checklist

  • I have searched through GitHub issues for similar issues.
  • I have completely read through the README and documentation.
  • I have tested my code with the latest version of Node.js and this package and confirmed it is still not working.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant