Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#CHANGELOG

## v2.4.3

2013-02-17

Issue [#52](https://github.com/qiniu/nodejs-sdk/pull/52):

- 去除对自定义 generateQueryString() 函数的依赖,使用 querystring 包的 stringify() 函数。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v2.4.2 已经发布,不可改动。请升级版本。


## v2.4.2

Issue [#48](https://github.com/qiniu/nodejs-sdk/pull/48):
Expand Down
3 changes: 2 additions & 1 deletion lib/rs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var path = require('path');
var crc32 = require('crc32');
var mime = require('mime');
var formstream = require('formstream');
var querystring = require('querystring');
var config = require('./conf.js');
var util = require('./util.js');
var img = require('./img.js');
Expand Down Expand Up @@ -135,7 +136,7 @@ Service.prototype.uploadWithToken = function(uploadToken, stream, key, mimeType,
"mime_type": mimeType
};
}
var callbackQueryString = util.generateQueryString(callbackParams);
var callbackQueryString = querystring.stringify(callbackParams);
var url = config.UP_HOST + "/upload";

var filename = path.basename(key);
Expand Down
15 changes: 0 additions & 15 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,6 @@ exports.generateActionString = function(bucket, key, mimeType, customMeta, crc32
return actionParams;
}

exports.generateQueryString = function (params) {
if (params.constructor === String) {
return params;
}
var total_params = [];
for (var key in params) {
total_params.push(escape(key) + "=" + escape(params[key]));
}
if (total_params.length > 0) {
return total_params.join("&");
} else {
return "";
}
}

// ------------------------------------------------------------------------------------------
// func readAll

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qiniu",
"version": "2.4.2",
"version": "2.4.3",
"description": "Node wrapper for Qiniu Resource (Cloud) Storage API",
"main": "index.js",
"directories": {
Expand Down