Is there a way to make the DataTransferItem::getAsFile() method asynchronous?
No. It's specified as synchronous. However, there is absolutely no reason to make this asynchronous - a reference to the File is quickly constructed and does not incorporate any data shoveling. Just as input.files
does synchronously get you references to not-yet-read-in files.
Is there a way to get
FileReader
to take aDataTransferItem
as an argument so it can do the async itself like it does already with blobs?
No. It just takes the item.getAsFile()
blob, and can read that in asynchronously.