diff --git a/StorageEngine.md b/StorageEngine.md index 4b411ab1..831a81ea 100644 --- a/StorageEngine.md +++ b/StorageEngine.md @@ -44,7 +44,11 @@ function getDestination (req, file, cb) { } function MyCustomStorage (opts) { - this.getDestination = (opts.destination || getDestination) + if (typeof opts.destination === 'string') { + this.getDestination = function ($0, $1, cb) { cb(null, opts.destination) } + } else { + this.getDestination = (opts.destination || getDestination) + } } MyCustomStorage.prototype._handleFile = function _handleFile (req, file, cb) {