New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@uppy/xhr-upload

Package Overview
Dependencies
Maintainers
5
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uppy/xhr-upload - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

21

lib/index.js

@@ -49,4 +49,4 @@ var _class, _temp;

*
* @param {Object} file File object with `data`, `size` and `meta` properties
* @returns {Object} blob updated with the new `type` set from `file.meta.type`
* @param {object} file File object with `data`, `size` and `meta` properties
* @returns {object} blob updated with the new `type` set from `file.meta.type`
*/

@@ -96,3 +96,3 @@

* @property {string} statusText
* @property {Object.<string, string>} headers
* @property {object.<string, string>} headers
*

@@ -573,2 +573,6 @@ * @param {string} responseText the response body string

if (this.opts.limit === 0) {
this.uppy.log('[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0', 'warning');
}
this.uppy.log('[XHRUpload] Uploading...');

@@ -580,2 +584,11 @@ var files = fileIDs.map(function (fileID) {

if (this.opts.bundle) {
// if bundle: true, we don’t support remote uploads
var isSomeFileRemote = files.some(function (file) {
return file.isRemote;
});
if (isSomeFileRemote) {
throw new Error('Can’t upload remote files when bundle: true option is set');
}
return this.uploadBundle(files);

@@ -620,2 +633,2 @@ }

return XHRUpload;
}(Plugin), _class.VERSION = "1.2.0", _temp);
}(Plugin), _class.VERSION = "1.3.0", _temp);

11

package.json
{
"name": "@uppy/xhr-upload",
"description": "Plain and simple classic HTML multipart form uploads with Uppy, as well as uploads using the HTTP PUT method.",
"version": "1.2.0",
"version": "1.3.0",
"license": "MIT",

@@ -27,13 +27,10 @@ "main": "lib/index.js",

"dependencies": {
"@uppy/companion-client": "1.2.0",
"@uppy/utils": "1.2.0",
"@uppy/companion-client": "^1.3.0",
"@uppy/utils": "^1.3.0",
"cuid": "^2.1.1"
},
"devDependencies": {
"@uppy/core": "1.2.0"
},
"peerDependencies": {
"@uppy/core": "^1.0.0"
},
"gitHead": "bd2beedcffbaa840de7069860e341f02268ddbb1"
"gitHead": "056a7114a15fc7480a4014342d7f2c19305dc96c"
}

@@ -29,4 +29,4 @@ const { Plugin } = require('@uppy/core')

*
* @param {Object} file File object with `data`, `size` and `meta` properties
* @returns {Object} blob updated with the new `type` set from `file.meta.type`
* @param {object} file File object with `data`, `size` and `meta` properties
* @returns {object} blob updated with the new `type` set from `file.meta.type`
*/

@@ -71,3 +71,3 @@ function setTypeInBlob (file) {

* @property {string} statusText
* @property {Object.<string, string>} headers
* @property {object.<string, string>} headers
*

@@ -109,3 +109,3 @@ * @param {string} responseText the response body string

// i18n
this.translator = new Translator([ this.defaultLocale, this.uppy.locale, this.opts.locale ])
this.translator = new Translator([this.defaultLocale, this.uppy.locale, this.opts.locale])
this.i18n = this.translator.translate.bind(this.translator)

@@ -539,2 +539,9 @@ this.i18nArray = this.translator.translateArray.bind(this.translator)

if (this.opts.limit === 0) {
this.uppy.log(
'[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0',
'warning'
)
}
this.uppy.log('[XHRUpload] Uploading...')

@@ -544,2 +551,8 @@ const files = fileIDs.map((fileID) => this.uppy.getFile(fileID))

if (this.opts.bundle) {
// if bundle: true, we don’t support remote uploads
const isSomeFileRemote = files.some(file => file.isRemote)
if (isSomeFileRemote) {
throw new Error('Can’t upload remote files when bundle: true option is set')
}
return this.uploadBundle(files)

@@ -546,0 +559,0 @@ }

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