From ec959d2c382e2d79ad0ec47d55ce591751ff16c6 Mon Sep 17 00:00:00 2001 From: Raymond Camden Date: Thu, 2 Feb 2017 09:19:28 -0600 Subject: [PATCH] fix lint --- lib/storage-handler.js | 2 +- lib/storage-service.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/storage-handler.js b/lib/storage-handler.js index 1141681..3b27845 100644 --- a/lib/storage-handler.js +++ b/lib/storage-handler.js @@ -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); } diff --git a/lib/storage-service.js b/lib/storage-service.js index 9a67be8..834639d 100644 --- a/lib/storage-service.js +++ b/lib/storage-service.js @@ -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);