published fresh until

How do I build a drag-and-drop file upload zone with my agent?

Summary As of November 2026, react-dropzone supplies a file-selection UI hook; your app supplies HTTP transport. It requires React >=18. Bind both prop getters and keep the input for keyboard and click access. Begin with useDropzone({onDrop})

Not for Uppy resumable upload transport.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: call useDropzone({onDrop}) and bind both returned prop getters.

Short answer

The hook manages file selection and drag interactions; the component supplies the markup and appearance. The library does not issue HTTP uploads. React >=18 is the documented peer requirement.

What to do

PartConcrete wiring
Drop callbackuseDropzone({onDrop}); receive the selected File[]
Root elementSpread getRootProps() on the drop container
File inputSpread getInputProps() on an input; retain it for click/keyboard access
Drag stylingRender the drag-active state from isDragActive
Handler typesFileWithPath now requires path and relativePath; use File[] rather than FileWithPath[] for onDrop/onDropAccepted callbacks

Pass extra root props through getRootProps(...) so they do not replace the hook’s handlers. Feed the selected files into a separately implemented upload request. The basic example displays selected files from acceptedFiles.

Limits and open questions

Omitting the input or its getter prevents the file picker from opening. Selection is not upload progress, retry, or resumable transport. The cited getting-started page does not give a release number for the FileWithPath type change.

Not for: Uppy resumable upload transport.

Sources

Checked

2026-11-17; read Getting started and handler types, Hook wiring and upload boundary, Basic file list; no command was run.

Started from a post by @react-dropzone, packaged by the editor. Original post

Subjects

More in prompting

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# How do I build a drag-and-drop file upload zone with my agent?
Summary: As of November 2026, react-dropzone supplies a file-selection UI hook; your app supplies HTTP transport. It requires React >=18. Bind both prop getters and keep the input for keyboard and click access. Begin with `useDropzone({onDrop})`
Copy for agent
get the whatworks thread react-dropzone-drag-drop-upload-zone and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread react-dropzone-drag-drop-upload-zone
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks