Skip to content

Commit 4a02c34

Browse files
authored
Merge pull request #245 from jemygraw/master
update js-sdk to compatible with plupload and fix some bugs
2 parents 3bde20b + fd1d1c3 commit 4a02c34

File tree

13 files changed

+777
-749
lines changed

13 files changed

+777
-749
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: node_js
22
node_js:
3-
- "0.12"
3+
- '4'
44
cache:
55
directories:
66
- node_modules
@@ -9,4 +9,4 @@ install:
99
- npm install
1010
- bower install
1111
script:
12-
- grunt
12+
- grunt

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,15 +235,15 @@ Qiniu-JavaScript-SDK 的示例 Demo 中的服务器端部分是基于[ Node.js
235235
},
236236
'FileUploaded': function(up, file, info) {
237237
// 每个文件上传成功后,处理相关的事情
238-
// 其中 info 是文件上传成功后,服务端返回的json,形式如
238+
// 其中 info.response 是文件上传成功后,服务端返回的json,形式如
239239
// {
240240
// "hash": "Fh8xVqod2MQ1mocfI4S4KpRL6D98",
241241
// "key": "gogopher.jpg"
242242
// }
243243
// 参考http://developer.qiniu.com/docs/v6/api/overview/up/response/simple-response.html
244244
245245
// var domain = up.getOption('domain');
246-
// var res = parseJSON(info);
246+
// var res = parseJSON(info.response);
247247
// var sourceLink = domain + res.key; 获取上传成功后的文件的Url
248248
},
249249
'Error': function(up, err, errTip) {
@@ -467,11 +467,11 @@ Qiniu-JavaScript-SDK 的示例 Demo 中的服务器端部分是基于[ Node.js
467467
```javascript
468468
469469
module.exports = {
470-
'ACCESS_KEY': '<Your Access Key>',
471-
'SECRET_KEY': '<Your Secret Key>',
472-
'Bucket_Name': '<Your Bucket Name>',
470+
'AccessKey': '<Your Access Key>',
471+
'SecretKey': '<Your Secret Key>',
472+
'Bucket': '<Your Bucket Name>',
473473
'Port': 19110,
474-
'Uptoken_Url': '<Your Uptoken_Url>', // demo 启动后会在本地 /uptoken 上提供获取 uptoken 的接口,所以这里可以填 'uptoken'
474+
'UptokenUrl': '<Your Uptoken_Url>', // demo 启动后会在本地 /uptoken 上提供获取 uptoken 的接口,所以这里可以填 'uptoken'
475475
'Domain': '<Your Bucket Domain>' // Bucket 的外链默认域名,在 Bucket 的内容管理里查看,如:'http://xxx.bkt.clouddn.com/'
476476
}
477477

bower.json

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "qiniu",
33
"description": "Javascript SDK for Qiniu Resource (Cloud) Storage API",
4-
"version": "v1.0.20",
4+
"version": "v1.0.21",
55
"main": "dist/qiniu.js",
66
"moduleType": [
77
"globals"
@@ -22,20 +22,16 @@
2222
"upload"
2323
],
2424
"authors": "[email protected]",
25-
"contributors": [
26-
{
27-
"name": "luoyeshu0507",
28-
"email": "[email protected]"
29-
},
30-
{
31-
"name": "codedogfish",
32-
"email": "[email protected]"
33-
},
34-
{
35-
"name": "dengchenhua",
36-
"email": "[email protected]"
37-
}
38-
],
25+
"contributors": [{
26+
"name": "luoyeshu0507",
27+
"email": "[email protected]"
28+
}, {
29+
"name": "codedogfish",
30+
"email": "[email protected]"
31+
}, {
32+
"name": "jinxinxin",
33+
"email": "[email protected]"
34+
}],
3935
"homepage": "https://github.com/qiniu/js-sdk",
4036
"repository": {
4137
"type": "git",

demo/config.js.example

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module.exports = {
2-
'ACCESS_KEY': '<Your Access Key>', // https://portal.qiniu.com/user/key
3-
'SECRET_KEY': '<Your Secret Key>',
4-
'Bucket_Name': '<Your Bucket Name>',
2+
'AccessKey': '<Your Access Key>', // https://portal.qiniu.com/user/key
3+
'SecretKey': '<Your Secret Key>',
4+
'Bucket': '<Your Bucket Name>',
55
'Port': 19110,
6-
'Uptoken_Url': 'uptoken',
6+
'UptokenUrl': 'uptoken',
77
'Domain': '<Your Bucket Name>' // bucket domain eg:http://qiniu-plupload.qiniudn.com/
88
};

0 commit comments

Comments
 (0)