I have a basic file upload widget which works fine in almost all cases but have just noticed that it seems to handle shortcuts differently to all other file types.
So for example the current issue is that when a user clicks to upload directly with the file upload and you give it a shortcut, it automatically resolves the underlying file the shortcut points to, everyone is happy.
However if you were to instead drag and drop the file onto the control it sends through the underlying .lnk
shortcut file, so just wondering why there is different behavior here and if there is anything I am doing wrong here or if because the browser interprets these 2 things as different interactions it is correct in not following the shortcut in the drag and drop scenario.
The file data is resolved as:
var files = fileSelectionEvent.target.files || fileSelectionEvent.dataTransfer.files;
As both the file input and the drag and drop end up pointing to the same function with the js event just being captured and passed through.
While you click the upload button, it shows a system-provided file chooser. When you select a shortcut file (*.lnk), Windows will automatically replace it to the real file which the shortcut points to.
While you drag and drops files, Windows doesn't handle them. So the shortcut files are received by browser directly.