Comparing version 3.1.0 to 3.1.1
@@ -1,3 +0,3 @@ | ||
### Setup your minio-java Github Repository | ||
Fork [minio-java upstream](https://github.com/minio/minio-js/fork) source repository to your own personal repository. | ||
### Setup your minio-js Github Repository | ||
Fork [minio-js upstream](https://github.com/minio/minio-js/fork) source repository to your own personal repository. | ||
@@ -4,0 +4,0 @@ Minio Javascript library uses gulp for its dependency management http://gulpjs.com/ |
@@ -30,2 +30,3 @@ /* | ||
exports.isValidDomain = isValidDomain; | ||
exports.probeContentType = probeContentType; | ||
exports.isValidPort = isValidPort; | ||
@@ -52,2 +53,6 @@ exports.isValidBucketName = isValidBucketName; | ||
var _mimeTypes = require('mime-types'); | ||
var _mimeTypes2 = _interopRequireDefault(_mimeTypes); | ||
var _lodash = require('lodash'); | ||
@@ -163,2 +168,14 @@ | ||
// Probes contentType using file extensions. | ||
// For example: probeContentType('file.png') returns 'image/png'. | ||
function probeContentType(path) { | ||
if (!_mimeTypes2['default'].lookup(path)) { | ||
contentType = 'application/octet-stream'; | ||
} else { | ||
contentType = _mimeTypes2['default'].lookup(filePath); | ||
} | ||
return contentType; | ||
} | ||
// isValidPort - is input port valid. | ||
@@ -165,0 +182,0 @@ |
@@ -46,3 +46,3 @@ /* | ||
function ObjectUploader(client, bucketName, objectName, partSize, callback) { | ||
function ObjectUploader(client, bucketName, objectName, partSize, contentType, callback) { | ||
_classCallCheck(this, ObjectUploader); | ||
@@ -57,2 +57,6 @@ | ||
this.partSize = partSize; | ||
// This contentType for the object. | ||
this.contentType = contentType; | ||
// Call like: callback(error, etag). | ||
@@ -73,5 +77,2 @@ this.callback = callback; | ||
// Don't bother with the content-type, default to octet stream for simplicity. | ||
this.contentType = 'application/octet-stream'; | ||
// This is for the multipart upload request — if null, we're either not initiated | ||
@@ -78,0 +79,0 @@ // yet or we're flushing in one packet. |
@@ -1,2 +0,2 @@ | ||
# JavaScript Client API Reference [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Minio/minio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
# JavaScript Client API Reference [![Slack](https://slack.minio.io/slack?type=svg)](https://slack.minio.io) | ||
@@ -3,0 +3,0 @@ ## Initialize Minio Client object. |
@@ -37,1 +37,11 @@ /* | ||
}) | ||
// Put a file in bucket my-bucketname with content-type detected automatically. | ||
// In this case it is `text/plain`. | ||
var file = 'my-testfile.txt' | ||
s3Client.fPutObject('my-bucketname', 'my-objectname', file, function(e) { | ||
if (e) { | ||
return console.log(e) | ||
} | ||
console.log("Success") | ||
}) |
{ | ||
"name": "minio", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "S3 Compatible Cloud Storage client", | ||
@@ -36,2 +36,3 @@ "main": "./dist/main/minio.js", | ||
"lodash": "^4.14.2", | ||
"mime-types": "^2.1.14", | ||
"mkdirp": "^0.5.1", | ||
@@ -38,0 +39,0 @@ "moment": "^2.10.3", |
@@ -1,2 +0,2 @@ | ||
# Minio JavaScript Library for Amazon S3 Compatible Cloud Storage [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Minio/minio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
# Minio JavaScript Library for Amazon S3 Compatible Cloud Storage [![Slack](https://slack.minio.io/slack?type=svg)](https://slack.minio.io) | ||
@@ -16,3 +16,3 @@ [![NPM](https://nodei.co/npm/minio.png)](https://nodei.co/npm/minio/) | ||
npm install --save minio@3.1.0 | ||
npm install --save minio@3.1.1 | ||
@@ -19,0 +19,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
627613
60
2
13
4981
+ Addedmime-types@^2.1.14
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)