-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Firstly thanks for this amazing library. I'm having an issue when I try to upload a file named GitHub.url with the following contents:
[InternetShortcut]
URL=https://github.com/
It's an Internet Shortcut (.url file) that is created in Windows. During upload the kind variable in the code below is incorrectly set as 'string' instead of 'file'.
elFinder/js/commands/upload.js
Line 197 in f9c906d
| kind = (trf.items && trf.items.length && trf.items[0].kind)? trf.items[0].kind : '', |
In the Chrome browser console below there are two entries, the first from a text file upload and the second from the url file upload. As you can see the second DataTransferItemList has 3 items instead of 1 and with the code above it only looks at the first item.
I'm not sure what the best solution would be, but I think the code should grep for file and if not found use the first item?
You can use the fiddle created at https://jsfiddle.net/ghvfdyam/ to reproduce this issue in both Chrome and Edge browsers.