diff --git a/README.md b/README.md index e191dc6..6f7cb07 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # High Level Amazon S3 Client +Fork from https://github.com/andrewrk/node-s3-client + ## Installation `npm install @auth0/s3 --save` diff --git a/lib/index.js b/lib/index.js index 526f5f1..d0d44d3 100644 --- a/lib/index.js +++ b/lib/index.js @@ -135,7 +135,7 @@ Client.prototype.uploadFile = function(params) { var s3Params = extend({}, params.s3Params); if (s3Params.ContentType === undefined) { var defaultContentType = params.defaultContentType || 'application/octet-stream'; - s3Params.ContentType = mime.lookup(localFile, defaultContentType); + s3Params.ContentType = mime.getType(localFile, defaultContentType); } var fatalError = false; var localFileSlicer = null; diff --git a/package.json b/package.json index ef06470..7374727 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Amazon S3 client for upload/download files", "main": "lib/index.js", "scripts": { - "test": "mocha" + "test": "mocha --exit" }, "repository": { "type": "git", @@ -38,7 +38,7 @@ "fd-slicer": "~1.0.0", "findit2": "~2.2.3", "graceful-fs": "~4.1.4", - "mime": "~1.4.1", + "mime": "^2.3.1", "mkdirp": "~0.5.0", "pend": "~1.2.0", "rimraf": "~2.2.8", diff --git a/yarn.lock b/yarn.lock index 4676148..102b450 100644 --- a/yarn.lock +++ b/yarn.lock @@ -163,10 +163,10 @@ jmespath@0.15.0: resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.15.0.tgz#a3f222a9aae9f966f5d27c796510e28091764217" integrity sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc= -mime@~1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" - integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== +mime@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.3.1.tgz#b1621c54d63b97c47d3cfe7f7215f7d64517c369" + integrity sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg== minimatch@3.0.4, minimatch@^3.0.4: version "3.0.4"