undici
undici copied to clipboard
Not getting the full type when parsing multipart/form-data
Bug Description
Not getting the full type when parsing multipart/form-data
Reproducible By
var b = new Blob(['123'], { type: 'text/plain;charset=utf-8'})
var fd = new FormData()
fd.set('x', b)
var res = new Response(fd)
res.clone().text().then(body =>
// Just making sure that it contains ;charset=utf-8 (which it dose)
console.log(body.includes('utf-8'))
)
new Response(fd).formData().then(fd => {
// returns just 'text/plain'
console.log(fd.get('x').type)
})
Expected Behavior
To get the full type, text/plain;charset=utf-8
Logs & Screenshots
Screenshot of chrome:
Screenshot of NodeJS
Environment
Not using undici directly - using Node.js v20.6.1 built in fetch
Additional context
presumable this revolves around the usage around Busboy... Maybe the type should be extracted from the headers instead...? to get the raw content-type.
@rishabhbizzle is attempting to deploy a commit to the shadcn-pro Team on Vercel.
A member of the Team first needs to authorize it.
@shadcn please look into this PR. It would be nice to have this feature available for use.
I seem to get this when using the vertical orientation. The range portion doesn't cover the background fully
I checked it and it's working fine please re-check your code with the example I added in docs.
dark mode:
light mode:
Please review this PR @shadcn
interesting. inspecting the element seems to show this for the range span element
Adding right-0 left-0
to
<SliderPrimitive.Range
className={cn(
"absolute h-full bg-primary",
orientation === "vertical" ? "w-full right-0 left-0" : "h-full"
)}
/>
fixed it for me. I'm curious if the misaligned span element is there for you as well.
I seem to get this when using the vertical orientation. The range portion doesn't cover the background fully
I checked it and it's working fine please re-check your code with the example I added in docs.
dark mode:
light mode:
![]()
Nope.. the span element is correctly aligned for me @jp-hedilog
@rishabhbizzle , thank you for this PR.
any reason this is not merged yet?
any reason this is not merged yet?
@shadcn 👀
I think a better approach would be to use radix/primitive
exposed data-orientation
attribute to differentiate the horizontal and vertical case directly using tailwindcss data-*
modifier. And another small nit is better to use w-2
following what the original shadcn slider (for default, and for new-york is w-1.5
does instead of hard code the w-[20px]
there. I have another implementation here in PR can take a look: https://github.com/shadcn-ui/ui/pull/2586