@@ -136,15 +136,16 @@ function getEncodedEntryUri(bucket, key) {
136136// ----- token --------
137137// @gist PutPolicy
138138function PutPolicy ( scope , callbackUrl , callbackBody , returnUrl , returnBody ,
139- asyncOps , endUser , expires ) {
139+ asyncOps , endUser , expires , persistentOps , persistentNotifyUrl ) {
140140 this . scope = scope || null ;
141141 this . callbackUrl = callbackUrl || null ;
142142 this . callbackBody = callbackBody || null ;
143143 this . returnUrl = returnUrl || null ;
144144 this . returnBody = returnBody || null ;
145- this . asyncOps = asyncOps || null ;
146145 this . endUser = endUser || null ;
147146 this . expires = expires || 3600 ;
147+ this . persistentOps = persistentOps || null ;
148+ this . persistentNotifyUrl = persistentNotifyUrl || null ;
148149}
149150// @endgist
150151
@@ -177,9 +178,6 @@ PutPolicy.prototype.getFlags = function(putPolicy) {
177178 if ( this . returnBody != null ) {
178179 flags [ 'returnBody' ] = this . returnBody ;
179180 }
180- if ( this . asyncOps != null ) {
181- flags [ 'asyncOps' ] = this . asyncOps ;
182- }
183181 if ( this . endUser != null ) {
184182 flags [ 'endUser' ] = this . endUser ;
185183 }
@@ -189,11 +187,25 @@ PutPolicy.prototype.getFlags = function(putPolicy) {
189187 if ( this . persistentNotifyUrl != null ) {
190188 flags [ 'persistentNotifyUrl' ] = this . persistentNotifyUrl ;
191189 }
190+ if ( this . persistentPipeline != null ) {
191+ flags [ 'persistentPipeline' ] = this . persistentPipeline ;
192+ }
193+ if ( this . mimeLimit != null ) {
194+ flags [ 'mimeLimit' ] = this . mimeLimit ;
195+ }
196+ if ( this . insertOnly != null ) {
197+ flags [ 'insertOnly' ] = this . insertOnly ;
198+ }
199+ if ( this . detectMime != null ) {
200+ flags [ 'detectMime' ] = this . detectMime ;
201+ }
202+ if ( this . saveKey != null ) {
203+ flags [ 'saveKey' ] = this . saveKey ;
204+ }
192205 flags [ 'deadline' ] = this . expires + Math . floor ( Date . now ( ) / 1000 ) ;
193206 return flags ;
194207}
195208
196-
197209function GetPolicy ( expires ) {
198210 this . expires = expires || 3600 ;
199211}
0 commit comments