DataTransferItem Uncaught DOMException
See original GitHub issueHello,
On Chrome (v.71.0) and not on Firefox, for some folders, I’ve this error:
Uncaught DOMException
and the inspector show me the part of code which is concerned:
if (e.dataTransfer.items) {
// Handle directories in Chrome using the proprietary FileSystem API
var items = toArray(e.dataTransfer.items).filter(function(item) {
return item.kind === 'file';
});
console.log(items);
if (items.length === 0)
return;
parallel(items.map(function(item) {
return function(cb) {
processEntry(item.webkitGetAsEntry(), cb);
}
;
}), function(err, results) {
// This catches permission errors with file:// in Chrome. This should never
// throw in production code, so the user does not need to use try-catch.
if (err)
throw err;
if (listeners.onDrop) {
listeners.onDrop(flatten(results), pos);
}
});
}
and more specifically at the line
throw err;
I’ve finally understood it was a name length problem : That concerns file with filename (path+name) with more than 260 characters (on Windows 7).
Do you understand why this Windows limit is also a limit in our case for Chrome drag&drop in Uppy dashbord (and not Firefox) ?
Thanks a lot, Aurélien
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
JS: Transfer DataTransferItemList to WebWorker
i want to use the synchroneous JS FileSystem API, therefore, this code has to be put to a webworker. the incoming data for...
Read more >JS Error "Uncaught DOMException: Failed to execute 'send ...
Data Channel (Generate and transfer data sample): JS Error "Uncaught DOMException: Failed to execute 'send' on 'RTCDataChannel': RTCDataChannel.readyState is ...
Read more >DataTransferItemList.add() - Web APIs | MDN
A DataTransferItem containing the specified data. If the drag item couldn't be created (for example, ... NotSupportedError DOMException.
Read more >clearData method (dataTransfer) JavaScript
Removes the specified formatted data from the current drag-and-drop operation. Note: The dataTransfer object and its clearData method are supported in ...
Read more >File API - W3C
... postMessage() , DataTransfer (part of the drag and drop API defined ... A FileReader has an associated error ( null or a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes. Line 42, and line 61. I’m not sure how we’d go about reporting these errors, maybe by just passing uppy.log function to
webkitGetAsEntryApi
? Would be nice if you looked into it.I didn’t see any console errors with this. I could try again with some extra logging. would the
readEntries
function in @uppy/utils/getDroppedFiles/utils/webkitGetAsEntryApi.js be the right place to add a console.error for that?