fix lint
This commit is contained in:
parent
907f83ac3a
commit
ec959d2c38
|
@ -85,7 +85,7 @@ exports.upload = function(provider, req, res, options, cb) {
|
|||
if ('function' === typeof options.getFilename) {
|
||||
file.originalFilename = file.name;
|
||||
file.name = options.getFilename(file, req, res);
|
||||
} else if(options.nameConflict === "makeUnique") {
|
||||
} else if (options.nameConflict === 'makeUnique') {
|
||||
file.originalFilename = file.name;
|
||||
file.name = uuid.v4() + path.extname(file.name);
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ function StorageService(options) {
|
|||
if (options.maxFileSize) {
|
||||
this.maxFileSize = options.maxFileSize;
|
||||
}
|
||||
if(options.nameConflict) {
|
||||
if (options.nameConflict) {
|
||||
this.nameConflict = options.nameConflict;
|
||||
}
|
||||
}
|
||||
|
@ -244,7 +244,7 @@ StorageService.prototype.upload = function(req, res, options, cb) {
|
|||
if (this.maxFileSize && !options.maxFileSize) {
|
||||
options.maxFileSize = this.maxFileSize;
|
||||
}
|
||||
if(this.nameConflict && !options.nameConflict) {
|
||||
if (this.nameConflict && !options.nameConflict) {
|
||||
options.nameConflict = this.nameConflict;
|
||||
}
|
||||
return handler.upload(this.client, req, res, options, cb);
|
||||
|
|
Loading…
Reference in New Issue