Skip to Content
Platform.Ontology

Directory upload (webkitdirectory)

Lets the person pick a whole folder; the page gets every file in it with relative paths.

You pick what to shareFiles and storageFilesWeb browsersWhile you use it

In one line

Can access every file inside a folder you choose, in order to upload them

Lets the person pick a whole folder; the page gets every file in it with relative paths.

One pick shares a full folder tree, often thousands of files. The site sees file names and sub folder structure, so a careless pick can expose more than expected.

What it can and can't do

What the user does: You click Upload folder and choose one.

It can

  • Receive every file in the folder, with its path inside the folder
  • Upload all of them
  • Show file names and sizes

It cannot

  • Change or delete the original files
  • See other folders or files you did not include
  • Get the files again later without another pick

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported72010-10-19None
EdgeSupported132015-11-12None
FirefoxSupported502016-11-15None
SafariSupported11.12018-04-12None
Safari on iPhoneSupported18.42025-03-31All iOS browsers use WebKit
Chrome on AndroidSupported1322025-01-14None
Samsung InternetSupported29.02025-10-25None

How a site asks for it

API<input type=file webkitdirectory>; File.webkitRelativePath; DataTransferItem.webkitGetAsEntry()
Browser compat keysapi.HTMLInputElement.webkitdirectory
api.File.webkitRelativePath
How access is grantedpicker
What the user seesNone (no browser prompt)
Needs a secure context (HTTPS)No
Needs a user gestureYes
Activationtransient
How long it lastsPer selection
How to take it backNothing to revoke (no permission is stored)
Inside an iframeWorks in any frame

Typical flow

  1. Person clicks the input
  2. Browser shows a folder chooser and, in Chrome, an Upload N files confirmation
  3. Page receives all files with webkitRelativePath

Data you get

Shape: none

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

Technical limits

  • Chrome shows a confirmation Upload N files to this site before handing over the list
  • Includes all files in sub folders (hidden files and dot files may be included; Chrome filters OS junk like .DS_Store)
  • Cannot browse parents or siblings of the chosen folder; webkitRelativePath starts at the chosen folder name
  • No count cap; very large folders are bounded by memory and Chrome's confirmation counts them
  • Support: Chrome 7, Safari 11.1, Firefox 50 (webkit prefix kept)

The story

What it is

Lets you pick a whole folder, and the page receives every file in it with its folder paths.

For you

You click upload, choose a folder, and the site gets all the files inside. It only gets what is in that folder, and you see a warning first.

For makers

It saves time for bulk uploads like photo sets, code projects and course files. The person picks the folder, so no ongoing access is given. It still can send a lot of data at once.

Where you see it

TypeExampleApps
productivityYou drag a project folder into a cloud drive and all its files and subfolders go up in one go.Google Drive, Dropbox
socialYou upload a whole album of photos at once.None named
developerYou upload a code project folder to a build or hosting site.GitHub, Netlify
gamesA game mod site takes a whole mod folder for review.None named
educationA student turns in a folder of project files to a class portal.None named
creativeA 3D or music web tool loads a whole folder of assets.None named

Risks

  • Large uploads
  • Easy to include extra files

What the platform says

  • MDN: webkitdirectory. Documents a file input option that lets a person choose a whole folder for upload.

Good uses and abuse

Legitimate uses

  • Upload a photo album or code folder
  • Static site deploy tools

Known abuse

  • Collecting more files than the person expects from a deep folder

Scores

ScoreValueMeaning
Sensitivity4 of 5How revealing the data is
Utility3 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

  • 2010-05, Chrome 7: webkitdirectory ships
  • 2016-11, Firefox 50: Firefox supports webkitdirectory

Sources

How well checked: Based on official documentation.

On this page