Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addDataTransfer doesn't work in Chrome #402

Open
MatthijsHartskeerl opened this issue Aug 12, 2021 · 0 comments
Open

addDataTransfer doesn't work in Chrome #402

MatthijsHartskeerl opened this issue Aug 12, 2021 · 0 comments

Comments

@MatthijsHartskeerl
Copy link

Using Chrome version: 90.0.4430.212

We're using version 2.8.22 of vue-upload-component, because we're not ready to move to Vue3 just yet. This version has a bug with addDataTransfer in Google Chrome.

When passing a DataTransfer object to the addDataTransfer function in Chrome nothing happens because the function tries to get a FileSystemFileEntry object but it gets a File object instead. The getEntry function can't deal with a File object and so nothing happens. This works fine on FireFox.

If in the getEntry function you add an else if after the if (entry.isFile) which looks something like the following it probably works again:

else if (entry instanceof File) {
  resolve([
    {
      size: entry.size,
      name: path + entry.name,
      type: entry.type,
      file: entry,
    }
  ])
}
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

No branches or pull requests

1 participant