files property (dataTransfer)
Returns a FileList collection that represents the dropped files during the current drag-and-drop operation.
Note: The files property is supported in Firefox from version 3.6 and in Safari from version 5. Although the files property is supported in Safari 4, it always returns null.The files property is only relevant for the ondrop event. Through the returned FileList collection, you can get the name, size and the contents of the files. For further details, please see the example below and the page for the FileList collection.
You can find the related objects in the Supported by objects section below.
This property is read-only.
A FileList collection that represents the dropped files.
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the files property:
Did you find this example helpful?
User Contributed Comments