@uppy/compressor
Advanced tools
Comparing version 1.0.0-beta.2 to 1.0.0-beta.3
# @uppy/compressor | ||
## 1.0.0-beta.3 | ||
Released: 2022-08-16 | ||
Included in: Uppy v3.0.0-beta.5 | ||
- @uppy/compressor: Fix Compressor being broken when no name is in the compressed blob (Artur Paikin / #3947) | ||
## 0.3.1 | ||
@@ -4,0 +11,0 @@ |
@@ -64,10 +64,15 @@ function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError("attempted to use private field on non-instance"); } return receiver; } | ||
} = compressedBlob; | ||
const { | ||
extension | ||
} = getFileNameAndExtension(name); | ||
this.uppy.setFileState(file.id, { | ||
name, | ||
extension, | ||
type, | ||
size, | ||
const extension = name && getFileNameAndExtension(name).extension; | ||
this.uppy.setFileState(file.id, { ...(name && { | ||
name | ||
}), | ||
...(extension && { | ||
extension | ||
}), | ||
...(type && { | ||
type | ||
}), | ||
...(size && { | ||
size | ||
}), | ||
data: compressedBlob | ||
@@ -74,0 +79,0 @@ }); |
{ | ||
"name": "@uppy/compressor", | ||
"description": "Uppy plugin that compresses images before upload, saving up to 60% in size", | ||
"version": "1.0.0-beta.2", | ||
"version": "1.0.0-beta.3", | ||
"license": "MIT", | ||
@@ -27,3 +27,3 @@ "main": "lib/index.js", | ||
"@transloadit/prettier-bytes": "^0.0.9", | ||
"@uppy/utils": "^5.0.0-beta", | ||
"@uppy/utils": "^5.0.0-beta.1", | ||
"compressorjs": "^1.1.1", | ||
@@ -34,8 +34,7 @@ "preact": "^10.5.13", | ||
"peerDependencies": { | ||
"@uppy/core": "^3.0.0-beta.2" | ||
"@uppy/core": "^3.0.0-beta.4" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"stableVersion": "0.3.0" | ||
} | ||
} |
@@ -55,8 +55,8 @@ import { BasePlugin } from '@uppy/core' | ||
const { name, type, size } = compressedBlob | ||
const { extension } = getFileNameAndExtension(name) | ||
const extension = name && getFileNameAndExtension(name).extension | ||
this.uppy.setFileState(file.id, { | ||
name, | ||
extension, | ||
type, | ||
size, | ||
...(name && { name }), | ||
...(extension && { extension }), | ||
...(type && { type }), | ||
...(size && { size }), | ||
data: compressedBlob, | ||
@@ -63,0 +63,0 @@ }) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23403
267
Updated@uppy/utils@^5.0.0-beta.1