Skip to content

Commit c4d68c2

Browse files
committed
Merge pull request #114 from cagegong/key_with_query
support key with query
2 parents d9d6f49 + 9c66bec commit c4d68c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

qiniu/rs.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ GetPolicy.prototype.makeRequest = function(baseUrl, mac) {
230230

231231
return baseUrl + '&token=' + downloadToken;
232232
}
233-
234-
function makeBaseUrl(domain, key) {
233+
// query like '-thumbnail', '?imageMogr2/thumbnail/960x' and so on
234+
function makeBaseUrl(domain, key, query) {
235235
key = new Buffer(key);
236-
return 'http://' + domain + '/' + querystring.escape(key);
236+
return 'http://' + domain + '/' + querystring.escape(key) + (query||'');
237237
}

0 commit comments

Comments
 (0)