Skip to content

Commit 71508d5

Browse files
committed
fix callback using json as body uptoken creation
1 parent 4271a34 commit 71508d5

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

examples/create_uptoken.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ var options = {
4343
scope: bucket,
4444
callbackUrl: 'http://api.example.com/qiniu/upload/callback',
4545
callbackBody: '{"key":"$(key)","hash":"$(etag)","fsize":$(fsize),"bucket":"$(bucket)","name":"$(x:name)"}',
46+
callbackBodyType: 'application/json'
4647
}
4748
var putPolicy = new qiniu.rs.PutPolicy(options);
4849
console.log(putPolicy.uploadToken(mac));

qiniu/conf.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,10 @@ exports.RPC_TIMEOUT = 60000; //60s
2323

2424
exports.Config = function Config(options) {
2525
options = options || {};
26-
//connect timeout, in seconds
27-
this.connectTimeout = options.connectTimeout || 30;
28-
//response timeout, in seconds
29-
this.responseTimeout = options.responseTimeout || 30;
30-
//put threshold, in bytes
31-
this.putThreshold = options.putThreshold || exports.BLOCK_SIZE;
3226
//use http or https protocol
3327
this.useHttpsDomain = options.useHttpsDomain || false;
3428
//use cdn accerlated domains
3529
this.useCdnDomain = options.useCdnDomain || true;
36-
//max retry times for chunk upload
37-
this.maxRetryTimes = options.maxRetryTimes || 3;
3830
//zone of the bucket
3931
//z0 huadong, z1 huabei, z2 huanan, na0 beimei
4032
this.zone = options.zone || null;

0 commit comments

Comments
 (0)