How can JS tell if a file or a folder is being dragged in?

JS how to determine whether a file or a folder is dragged in. Dragging a file or folder finds that ev.dataTransfer.files is an array of only one element, and how to determine whether a file or a folder is dragged in. The current practice is to find that the difference between a file and a folder is that the type of the file is not empty, while the type of the folder is empty, so I do not know whether it is correct to distinguish the file and the folder according to whether the type is empty.
below the image below is a file drag under the first FileList, and a folder drag under the second FileList.

Mar.02,2021

refer to this?

https://codeshelper.com/a/11.


< hr >

if you want to see specific js drag upload files, take a look at this article front end page file drag upload module js code example

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e54915-43ff8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e54915-43ff8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?