Skip to Content
Platform.Ontology

Dropping files and folders onto the page

Receives files and whole folders the person drags onto the page, with no prompt.

Works without askingFiles and storageFilesWeb browsersWhile you use it

In one line

Can receive files or whole folders you drag onto the page

Receives files and whole folders the person drags onto the page, with no prompt.

Dropping is consent for exactly what is dropped, including folder trees. The site can read file contents and, in Chrome, ask for write access to the dropped items.

What it can and can't do

What the user does: You drag files from your desktop onto the page and let go.

It can

  • Receive the files and folders you drop
  • Open the contents of what you dropped
  • Include folders with subfolders
  • Do it with no prompt

It cannot

  • See the file names before you drop
  • Take files without a drag and drop
  • Change the original files, unless you also allow saving in Chrome
  • Get them again later without another drop

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported132011-08-02None
EdgeSupported142016-08-02None
FirefoxSupported502016-11-15None
SafariSupported11.12018-04-12None
Safari on iPhoneSupported11.32018-03-29All iOS browsers use WebKit
Chrome on AndroidSupported182012-06-27None
Samsung InternetSupported1.02013-04-27None

How a site asks for it

APIdrop event; dataTransfer.files; items; webkitGetAsEntry(); getAsFileSystemHandle()
Browser compat keysapi.DataTransferItem.webkitGetAsEntry
api.DataTransferItem.getAsFileSystemHandle
api.DataTransfer.files
How access is grantednone
What the user seesNone (no browser prompt)
Needs a secure context (HTTPS)No
Needs a user gestureNo
Activationnone
How long it lastsPer drop
How to take it backNothing to revoke (no permission is stored)
Inside an iframeDrops go to the document under the pointer; dropped items are same-origin readable only in that document

Typical flow

  1. Person drags files from the OS
  2. Page handles dragover and drop
  3. Page reads files and walks directory entries

Data you get

Shape: none

No individual data fields. The signal is the access itself.

Technical limits

  • Contents readable only inside the drop handler (protected mode otherwise)
  • Dropped folders: webkitGetAsEntry returns the full tree, readEntries returns at most 100 entries per call in Chrome (loop until empty)
  • getAsFileSystemHandle (Chrome 86) can request write access to the dropped file with a prompt
  • Cannot start a drag from OS file locations; cannot read drag data before drop
  • Dropped item paths are hidden; only names and relative paths

The story

What it is

Receives files and folders you drag onto the page, with no prompt.

For you

You drag a file from your desktop onto the page and let go. It is the act of dropping that gives the page the file. No prompt appears because you did it yourself.

For makers

It is the easiest way to add files and feels natural. Makers get fast uploads and fewer clicks. Because the drop is the consent, no extra prompt is needed.

Where you see it

TypeExampleApps
messagingYou drop a picture or document into a chat window to send it.Slack, Discord, WhatsApp Web
creativeYou drop a photo into a web editor to start work.Canva, Photopea
productivityYou drop files into a cloud folder in your browser.Google Drive, Dropbox
gamesYou drop a save file or custom map onto a browser game to load it.None named
productivityYou drag a file onto an email to attach it.Gmail
videoYou drop a video onto an online converter or editor.None named
developerYou drop a folder of files onto a web deploy tool.Netlify Drop

Risks

  • Easy to drop the wrong file
  • Large drag in

What the platform says

Good uses and abuse

Legitimate uses

  • Drag and drop uploaders
  • Folder imports
  • Media editors

Known abuse

  • Surprise folder uploads
  • Fake drop zones

Scores

ScoreValueMeaning
Sensitivity3 of 5How revealing the data is
Utility5 of 5How useful it is to honest apps
Friction1 of 5How much the user has to do
Fingerprint bitsNot ratedRough identifying entropy, when known

History

  • 2020-10, Chrome 86: getAsFileSystemHandle on dropped items

Sources

How well checked: Based on official documentation.

On this page