Skip to content

Commit

Permalink
Merge a09a1b0 into c30d13a
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuangya committed Jan 6, 2015
2 parents c30d13a + a09a1b0 commit b6a4180
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var client = qn.create({
accessKey: 'your access key',
secretKey: 'your secret key',
bucket: 'your bucket name',
domain: 'http://{bucket}.u.qiniudn.com',
origin: 'http://{bucket}.u.qiniudn.com',
// timeout: 3600000, // default rpc timeout: one hour, optional
// if your app outside of China, please set `uploadURL` to `http://up.qiniug.com/`
// uploadURL: 'http://up.qiniu.com/',
Expand Down
4 changes: 2 additions & 2 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ function Qiniu(options) {
throw new TypeError('required accessKey, secretKey and bucket');
}

options.domain = options.domain || null;
options.origin = options.origin || null;
options.timeout = options.timeout || DEFAULT_TIMEOUT;
options.downloadTimeout = options.downloadTimeout || DEFAULT_TIMEOUT;
this.options = options;
this._uploadURL = options.uploadURL || 'http://up.qiniu.com/';

this._baseURL = options.domain || 'http://' + options.bucket + '.qiniudn.com';
this._baseURL = options.origin || 'http://' + options.bucket + '.qiniudn.com';
if (this._baseURL[this._baseURL.length - 1] !== '/') {
this._baseURL += '/';
}
Expand Down

0 comments on commit b6a4180

Please sign in to comment.