Skip to content

Conversation

@mguinness
Copy link
Contributor

Fixes #3262. I think this could be related to Issue 155455: item.webkitGetAsEntry().file() reports an empty file type.

Fix uses DataTransfer.types array to establish if transfer is a file.

An array of the data formats used in the drag operation. Each format is string. If the drag operation included no data, this list will be empty. If any files are included in the drag operation, then one of the types will be the string Files.

Fixes Studio-42#3262.  I think this could be related to [Issue 155455: item.webkitGetAsEntry().file() reports an empty file type](https://bugs.chromium.org/p/chromium/issues/detail?id=155455).

Fix uses [DataTransfer.types](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/types) array to establish if transfer is a file.

> An array of the data formats used in the drag operation. Each format is string. If the drag operation included no data, this list will be empty. If any files are included in the drag operation, then one of the types will be the string Files.
@nao-pon nao-pon self-assigned this Mar 9, 2021
@nao-pon
Copy link
Member

nao-pon commented Mar 9, 2021

@mguinness thanks you. I will verify this.

@nao-pon nao-pon merged commit ec851f0 into Studio-42:master Mar 10, 2021
@nao-pon
Copy link
Member

nao-pon commented Mar 10, 2021

@mguinness This looked good so I completed the merge. Thanks! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upload problem

2 participants