react-dropzone ignores dropped files in Chrome 157: SecurityError on FileSystemFileHandle.getFile()

SecurityError: Failed to execute 'getFile' on 'FileSystemFileHandle': An attempt was made to break through the security policy of the user agent.

Short answer: Chrome and Edge 157 refuse getFile() on a dropped file that sits in a protected folder, such as AppData. file-selector 1.2 to 4.0.0, which react-dropzone 14 and 15 use, has no fallback, so the drop is lost without a message. Upgrade to react-dropzone 19.2.0 or later, or pass the small getFilesFromEvent function below.

No time to dig in? I upgrade react-dropzone or add the drop fix, and send you a pull request within 48 hours: $49, card, no account. Still failing, full refund. The free steps are below.

Checked on 11 November 2026 against the sources below.

Why it happens

For a dropped file, old file-selector calls item.getAsFileSystemHandle() and then handle.getFile(). Chromium 157 added a blocklist check to that read: for a file in a blocked folder it now answers with a SecurityError. On Windows the blocked folders include %LOCALAPPDATA%, %APPDATA%, %ProgramData%, Program Files and the Windows folder. Classic Outlook hands over a dragged attachment as a temporary copy, and the report below puts that copy under %LOCALAPPDATA%, so the read is refused. The plain File from item.getAsFile() is still readable. Firefox has no getAsFileSystemHandle(), so the old code takes the fallback there and works. The promise rejects inside react-dropzone, so onDrop never runs. How we checked (11 November 2026): we read Chromium's source at two release tags. In 157.0.8103.50, FileSystemAccessFileHandleImpl::AsBlob (the code behind getFile()) runs the new check and returns a security error; 156.0.8078.82 has no such check. We then ran ten file-selector versions in Node 24 with a simulated drop whose getFile() throws this error. Versions 1.2.0, 2.1.0, 2.1.2, 3.0.0, 3.1.2 and 4.0.0 rejected the drop. Versions 0.6.0, 4.0.2, 4.1.0 and 5.0.2 returned the file. The function below returned the file on every version. We did not reproduce the drop from Outlook in a real Chrome 157: that part comes from the Documenso report and Chromium's source. file-selector 2.1.2 alone had 12.2 million npm downloads in the week of 3 to 9 November 2026.

You may also see

Dragging an attachment from Outlook onto the upload area does nothing in Chrome 157 or Edge 157
onDrop is never called and no error is shown; the same drop works in Firefox
Uncaught (in promise) SecurityError in file-selector fromDataTransferItem

Fix

  1. Check it's this: in Chrome or Edge 157 on Windows, drag an attachment from classic Outlook (or a file from %TEMP%, which is inside %LOCALAPPDATA%) onto your drop zone. Nothing happens and the console shows the SecurityError above. Then check the library: npm ls file-selector shows a version from 1.2 to 4.0.0.
  2. Best fix: upgrade react-dropzone to 19.2.0 or later (20.2.0 is current, 8 November 2026). From 19.2.0 it requires file-selector 4.1.0 or later, which reads item.getAsFile() first. Versions 18 and later need React 18 or later, and it is a jump of several major versions from 14, so read the release notes and run your upload tests.
    npm install react-dropzone@latest
    npm ls file-selector
  3. Can't upgrade yet (React 16 or 17, or a pinned design system): keep your version and pass getFilesFromEvent. It reads plain files during the drop and leaves folders, file-input changes and everything else to the library. Call getAsFile() before any await: the items are empty once the drop event has finished.
    import { useDropzone } from "react-dropzone";
    import { fromEvent } from "file-selector";
    
    async function getFilesFromEvent(event) {
      if (event.type === "drop" && event.dataTransfer && event.dataTransfer.items) {
        const items = Array.from(event.dataTransfer.items).filter((i) => i.kind === "file");
        const hasFolder = items.some((i) => {
          const entry = typeof i.webkitGetAsEntry === "function" ? i.webkitGetAsEntry() : null;
          return entry && entry.isDirectory;
        });
        if (!hasFolder) {
          const files = items.map((i) => i.getAsFile()).filter(Boolean);
          if (files.length) {
            files.forEach((f) => {
              if (!("path" in f)) {
                Object.defineProperty(f, "path", { value: "./" + f.name, enumerable: true });
              }
            });
            return files;
          }
        }
      }
      return fromEvent(event);
    }
    
    const { getRootProps, getInputProps } = useDropzone({ onDrop, getFilesFromEvent });
  4. Using file-selector without react-dropzone: upgrade it to 4.1.0 or later. Its fromEvent(event) call is unchanged for drop and change events.
  5. A UI kit wraps the dropzone for you (an upload component from a design system): check with npm ls file-selector which package pulls the old version, and look for a getFilesFromEvent or dropzone-options prop on that component.
  6. Test after the change: drop a file from the desktop, a file from %TEMP%, an Outlook attachment and a folder, and pick a file through the button. All five should reach onDrop.
Build still red, or no time to dig in? I fix it for you: send a GitHub invite or a zip, and you get a tested pull request that makes the build pass on the new version. No passwords or production keys needed.

Get it fixed: $49

Pay by card, no account needed. Pull request within 48 hours; build still failing, full refund.

How it works: 1. Pay on Gumroad; the checkout asks for the repository. 2. Invite my GitHub user, Donrulezz, to that repository only (private is fine), or email a zip with the failing log to hello@deadlinefix.com. 3. You get a pull request with a list of every change; you review, merge and deploy. I never ask for cloud passwords or production keys.

Who does the work: me, Ashish, the owner of this site, based in India. My public code and tools are on GitHub: github.com/Donrulezz.

Watch out

Sources

Did this fix it?

What's still not working?

Describe what happens and paste any error message. We read every report and fix the page.

Other errors breaking soon

All "breaking soon" fixes