@@ -52,9 +52,11 @@ exports.upload = function(provider, req, res, options, cb) {
52
52
self . _fieldsSize += buffer . length ;
53
53
if ( self . _fieldsSize > self . maxFieldsSize ) {
54
54
self . _error ( new Error (
55
- g . f ( '{{maxFieldsSize}} exceeded, received %s bytes of field data' ,
55
+ g . f (
56
+ '{{maxFieldsSize}} exceeded, received %s bytes of field data' ,
56
57
self . _fieldsSize
57
- ) ) ) ;
58
+ )
59
+ ) ) ;
58
60
return ;
59
61
}
60
62
value += decoder . write ( buffer ) ;
@@ -104,10 +106,12 @@ exports.upload = function(provider, req, res, options, cb) {
104
106
if ( Array . isArray ( allowedContentTypes ) && allowedContentTypes . length !== 0 ) {
105
107
if ( allowedContentTypes . indexOf ( file . type ) === - 1 ) {
106
108
self . _error ( new Error (
107
- g . f ( '{{contentType}} "%s" is not allowed (Must be in [%s])' ,
109
+ g . f (
110
+ '{{contentType}} "%s" is not allowed (Must be in [%s])' ,
108
111
file . type ,
109
112
allowedContentTypes . join ( ', ' )
110
- ) ) ) ;
113
+ )
114
+ ) ) ;
111
115
return ;
112
116
}
113
117
}
@@ -203,10 +207,12 @@ exports.upload = function(provider, req, res, options, cb) {
203
207
// - s3-upload-stream doesn't provide a way to do this in it's public interface
204
208
// - We could call provider.delete file but it would not delete multipart data
205
209
self . _error ( new Error (
206
- g . f ( '{{maxFileSize}} exceeded, received %s bytes of field data (max is %s)' ,
210
+ g . f (
211
+ '{{maxFileSize}} exceeded, received %s bytes of field data (max is %s)' ,
207
212
fileSize ,
208
213
maxFileSize
209
- ) ) ) ;
214
+ )
215
+ ) ) ;
210
216
return ;
211
217
}
212
218
} ) ;
0 commit comments