File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments