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