Skip to content

Commit 6ba08ce

Browse files
committed
Merge pull request #120 from qiniu/develop
Release 6.1.6
2 parents f9e3b4a + dea0582 commit 6ba08ce

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

qiniu/rs.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,12 @@ PutPolicy.prototype.getFlags = function(putPolicy) {
203203
flags['saveKey'] = this.saveKey;
204204
}
205205
flags['deadline'] = this.expires + Math.floor(Date.now() / 1000);
206+
if (this.fsizeLimit != null) {
207+
flags['fsizeLimit'] = this.fsizeLimit;
208+
}
209+
if (this.insertOnly != null) {
210+
flags['insertOnly'] = this.insertOnly;
211+
}
206212
return flags;
207213
}
208214

@@ -230,8 +236,8 @@ GetPolicy.prototype.makeRequest = function(baseUrl, mac) {
230236

231237
return baseUrl + '&token=' + downloadToken;
232238
}
233-
234-
function makeBaseUrl(domain, key) {
239+
// query like '-thumbnail', '?imageMogr2/thumbnail/960x' and so on
240+
function makeBaseUrl(domain, key, query) {
235241
key = new Buffer(key);
236-
return 'http://' + domain + '/' + querystring.escape(key);
242+
return 'http://' + domain + '/' + querystring.escape(key) + (query||'');
237243
}

0 commit comments

Comments
 (0)