Socket
Socket
Sign inDemoInstall

@uppy/utils

Package Overview
Dependencies
Maintainers
8
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uppy/utils - npm Package Compare versions

Comparing version 4.1.1 to 4.1.2

7

CHANGELOG.md
# @uppy/utils
## 4.1.2
Released: 2022-08-17
Included in: Uppy v2.13.4
- @uppy/utils: fix drop of multiple files on Chromium browsers (Antoine du Hamel / #3998)
## 4.1.1

@@ -4,0 +11,0 @@

14

lib/getDroppedFiles/utils/webkitGetAsEntryApi/index.js

@@ -52,3 +52,3 @@ "use strict";

async function* getFilesFromDataTransfer(dataTransfer, logDropError) {
for (const item of dataTransfer.items) {
const entries = await Promise.all(Array.from(dataTransfer.items, async item => {
var _await$item$getAsFile;

@@ -58,4 +58,14 @@

const entry = (_await$item$getAsFile = await (item.getAsFileSystemHandle == null ? void 0 : item.getAsFileSystemHandle())) != null ? _await$item$getAsFile : getAsFileSystemHandleFromEntry(item.webkitGetAsEntry(), logDropError); // :entry can be null when we drop the url e.g.
const entry = (_await$item$getAsFile = await (item.getAsFileSystemHandle == null ? void 0 : item.getAsFileSystemHandle())) != null ? _await$item$getAsFile : getAsFileSystemHandleFromEntry(item.webkitGetAsEntry(), logDropError);
return {
lastResortFile,
entry
};
}));
for (const {
lastResortFile,
entry
} of entries) {
// :entry can be null when we drop the url e.g.
if (entry != null) {

@@ -62,0 +72,0 @@ try {

2

package.json
{
"name": "@uppy/utils",
"description": "Shared utility functions for Uppy Core and plugins maintained by the Uppy team.",
"version": "4.1.1",
"version": "4.1.2",
"license": "MIT",

@@ -6,0 +6,0 @@ "main": "lib/index.js",

@@ -44,6 +44,11 @@ import getRelativePath from './getRelativePath.js'

export default async function* getFilesFromDataTransfer (dataTransfer, logDropError) {
for (const item of dataTransfer.items) {
const entries = await Promise.all(Array.from(dataTransfer.items, async item => {
const lastResortFile = item.getAsFile() // Chromium bug, see https://github.com/transloadit/uppy/issues/3505.
const entry = await item.getAsFileSystemHandle?.()
?? getAsFileSystemHandleFromEntry(item.webkitGetAsEntry(), logDropError)
return { lastResortFile, entry }
}))
for (const { lastResortFile, entry } of entries) {
// :entry can be null when we drop the url e.g.

@@ -50,0 +55,0 @@ if (entry != null) {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc