getAsFile

external fun getAsFile(): File?(source)

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

MDN Reference