This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

files

Summary

Returns a FileList of the files being dragged, if any.

Property of dom/DataTransferdom/DataTransfer

Syntax

Note: This property is read-only.

var result = element.files;

Return Value

Returns an object of type ObjectObject

A live FileList sequence consisting of File objects representing the files being dragged (if any).

Examples

//retrieve list of files being dragged
function getDragFiles(e) {
  var oData = e.dataTransfer;
  var fList = oData.files;
}

Notes

This version of the API does not expose the types of the files during the drag.

Related specifications

HTML5
Candidate Recommendation