You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The DropZone component does not support a "name" prop. It would be good to be able to add the html "name" attribute to the <input> it renders.
The specific use case is using the component in a multipart/form-data form in a Remix app. Without a name attribute, the input is not picked up in the action using composeUploadHandlers, createMemoryUploadHandler (I feel like this is more on the Polaris than Remix, as adding a standard html attribute seems standard)
Expected behavior
The file upload input takes a "name" and is picked up in Remix's action (for FormData)
Actual behavior
The file upload input is ignored
Steps to reproduce
Remix route
export async function action({ request }: ActionFunctionArgs) {
const uploadHandler = composeUploadHandlers(
multipartUploadHandler, // our custom upload handler
createMemoryUploadHandler() // should pick up everything else when the first handler returns undefined
);
const formData = await parseMultipartFormData(request, uploadHandler);
}
Summary
The DropZone component does not support a "name" prop. It would be good to be able to add the html "name" attribute to the
<input>
it renders.The specific use case is using the component in a multipart/form-data form in a Remix app. Without a name attribute, the input is not picked up in the action using
composeUploadHandlers
,createMemoryUploadHandler
(I feel like this is more on the Polaris than Remix, as adding a standard html attribute seems standard)Expected behavior
The file upload input takes a "name" and is picked up in Remix's action (for FormData)
Actual behavior
The file upload input is ignored
Steps to reproduce
Remix route
// Form
When the form is submitted, the DropZone file input is not included as form data in Remix action
Are you using React components?
Yes
Polaris version number
12.27.0
Browser
Chrome
Device
No response
The text was updated successfully, but these errors were encountered: