getAsFile

open external fun getAsFile(): File?(source)

The getAsFile() method of the DataTransferItem interface returns the drag data item's File object if the item is a file. If the item is not a file, this method returns null.

MDN Reference