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) {
203
203
flags [ 'saveKey' ] = this . saveKey ;
204
204
}
205
205
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
+ }
206
212
return flags ;
207
213
}
208
214
@@ -230,8 +236,8 @@ GetPolicy.prototype.makeRequest = function(baseUrl, mac) {
230
236
231
237
return baseUrl + '&token=' + downloadToken ;
232
238
}
233
-
234
- function makeBaseUrl ( domain , key ) {
239
+ // query like '-thumbnail', '?imageMogr2/thumbnail/960x' and so on
240
+ function makeBaseUrl ( domain , key , query ) {
235
241
key = new Buffer ( key ) ;
236
- return 'http://' + domain + '/' + querystring . escape ( key ) ;
242
+ return 'http://' + domain + '/' + querystring . escape ( key ) + ( query || '' ) ;
237
243
}
You can’t perform that action at this time.
0 commit comments