Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ali-oss

Package Overview
Dependencies
Maintainers
3
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ali-oss - npm Package Compare versions

Comparing version 4.6.3 to 4.7.0

README.md

7

History.md
4.7.0 / 2017-01-05
==================
* fix: the copy object api bug which can not use non-English source object name (#166)
* feat: add process params to signatureUrl and get api for image process (#170)
* fix: multipartUpload can not work with IE10 bug (#167)
4.6.3 / 2016-12-20

@@ -3,0 +10,0 @@ ==================

@@ -20,2 +20,3 @@ 'use strict';

var dateFormat = require('dateformat');
var bowser = require('bowser');

@@ -395,2 +396,14 @@ var globalHttpAgent = new AgentKeepalive();

/*
* Check Browser And Version
* @param {String} [name] browser name: like IE, Chrome, Firefox
* @param {String} [version] browser major version: like 10(IE 10.x), 55(Chrome 55.x), 50(Firefox 50.x)
* @return {Bool} true or false
* @api private
*/
proto.checkBrowserAndVersion = function checkBrowserAndVersion(name, version) {
return ((bowser.name == name) && (bowser.version.split('.')[0] == version));
};
/**

@@ -397,0 +410,0 @@ * thunkify xml.parseString

35

lib/multipart.js

@@ -95,3 +95,2 @@ 'use strict';

var result = yield self._uploadPart(name, uploadId, partNo, data);
doneParts.push({

@@ -112,18 +111,22 @@ number: partNo,

var jobs = [];
for (var i = 0; i < todo.length; i++) {
jobs.push(uploadPartJob(this, todo[i]));
}
if (this.checkBrowserAndVersion('Internet Explorer', '10')) {
for (var i = 0; i < todo.length; i++) {
yield uploadPartJob(this, todo[i]);
}
} else {
// upload in parallel
var jobs = [];
for (var i = 0; i < todo.length; i++) {
jobs.push(uploadPartJob(this, todo[i]));
}
const defaultParallel = 5;
var parallel = options.parallel || defaultParallel;
var results = yield gather(jobs, parallel);
const defaultParallel = 5;
var parallel = options.parallel || defaultParallel;
// yield in parallel
var results = yield gather(jobs, parallel);
// check errors after all jobs are completed
for (var i = 0; i < results.length; i++) {
if (results[i].isError) {
throw new Error(
'Failed to upload some parts with error: ' + results[i].error.toString());
// check errors after all jobs are completed
for (var i = 0; i < results.length; i++) {
if (results[i].isError) {
throw new Error(
'Failed to upload some parts with error: ' + results[i].error.toString());
}
}

@@ -130,0 +133,0 @@ }

@@ -147,2 +147,7 @@ 'use strict';

options = options || {};
if (options.process) {
options.subres = options.subres || {};
options.subres['x-oss-process'] = options.process;
}
var result;

@@ -255,5 +260,8 @@ try {

if (sourceName[0] !== '/') {
// copy same bucket object
sourceName = '/' + this.options.bucket + '/' + sourceName;
// no specify bucket name
sourceName = '/' + this.options.bucket + '/' + encodeURIComponent(sourceName);
} else {
sourceName = '/' + encodeURIComponent(sourceName.slice(1));
}
options.headers['x-oss-copy-source'] = sourceName;

@@ -397,5 +405,5 @@

var resource = this._getResource(params);
var query = {};
var signList = [];
for (var k in options.response) {

@@ -410,2 +418,9 @@ var key = 'response-' + k.toLowerCase();

}
if (options.process){
var processKeyword = 'x-oss-process';
query[processKeyword] = options.process;
var item = processKeyword + '=' + options.process;
signList.push(item);
}
if (signList.length > 0) {

@@ -412,0 +427,0 @@ signList.sort();

{
"name": "ali-oss",
"version": "4.6.3",
"version": "4.7.0",
"description": "aliyun oss(open storage service) node client",

@@ -53,2 +53,3 @@ "main": "lib/client.js",

"bluebird": "^3.1.5",
"bowser": "^1.6.0",
"browserify": "^13.0.1",

@@ -63,2 +64,3 @@ "co-fs": "^1.2.0",

"should": "^11.0.0",
"sinon": "^1.17.6",
"thunk-mocha": "^1.0.3",

@@ -65,0 +67,0 @@ "uglify-js": "^2.7.1"

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