Comparing version 7.0.1 to 7.0.2
@@ -44,2 +44,3 @@ /* | ||
exports.isArray = isArray; | ||
exports.isValidDate = isValidDate; | ||
exports.makeDateLong = makeDateLong; | ||
@@ -304,2 +305,8 @@ exports.makeDateShort = makeDateShort; | ||
// check if arg is a valid date | ||
function isValidDate(arg) { | ||
return arg instanceof Date && !isNaN(arg); | ||
} | ||
// Create a Date string with format: | ||
@@ -306,0 +313,0 @@ // 'YYYYMMDDTHHmmss' + Z |
@@ -250,3 +250,3 @@ # JavaScript Client API Reference [![Slack](https://slack.minio.io/slack?type=svg)](https://slack.minio.io) | ||
<a name="listObjectsV2"></a> | ||
### listObjectsV2(bucketName, prefix, recursive) | ||
### listObjectsV2(bucketName, prefix, recursive, startAfter) | ||
@@ -263,2 +263,3 @@ Lists all objects in a bucket using S3 listing objects V2 API | ||
| `recursive` | _bool_ | `true` indicates recursive style listing and `false` indicates directory style listing delimited by '/'. (optional, default `false`). | | ||
| `startAfter` | _string_ | Specifies the object name to start after when listing objects in a bucket. (optional, default `''`). | | ||
@@ -287,3 +288,3 @@ | ||
```js | ||
var stream = minioClient.listObjectsV2('mybucket','', true) | ||
var stream = minioClient.listObjectsV2('mybucket','', true,'') | ||
stream.on('data', function(obj) { console.log(obj) } ) | ||
@@ -708,3 +709,3 @@ stream.on('error', function(err) { console.log(err) } ) | ||
<a name="presignedUrl"></a> | ||
### presignedUrl(httpMethod, bucketName, objectName, expiry[, reqParams, cb]) | ||
### presignedUrl(httpMethod, bucketName, objectName[, expiry, reqParams, requestDate, cb]) | ||
@@ -722,4 +723,5 @@ Generates a presigned URL for the provided HTTP method, 'httpMethod'. Browsers/Mobile clients may point to this URL to directly download objects even if the bucket is private. This presigned URL can have an associated expiration time in seconds after which the URL is no longer valid. The default value is 7 days. | ||
|`objectName` | _string_ | Name of the object. | | ||
|`expiry` | _number_ | Expiry time in seconds. Default value is 7 days. | | ||
|`reqParams` | _object_ | request parameters. | | ||
|`expiry` | _number_ | Expiry time in seconds. Default value is 7 days. (optional) | | ||
|`reqParams` | _object_ | request parameters. (optional) | | ||
|`requestDate` | _Date_ | A date object, the url will be issued at. Default value is now. (optional) | | ||
|`callback(err, presignedUrl)` | _function_ | Callback function is called with non `null` err value in case of error. `presignedUrl` will be the URL using which the object can be downloaded using GET request. If no callback is passed, a `Promise` is returned. | | ||
@@ -755,3 +757,3 @@ | ||
<a name="presignedGetObject"></a> | ||
### presignedGetObject(bucketName, objectName, expiry[, cb]) | ||
### presignedGetObject(bucketName, objectName[, expiry, respHeaders, requestDate, cb]) | ||
@@ -769,3 +771,5 @@ Generates a presigned URL for HTTP GET operations. Browsers/Mobile clients may point to this URL to directly download objects even if the bucket is private. This presigned URL can have an associated expiration time in seconds after which the URL is no longer valid. The default value is 7 days. | ||
|`objectName` | _string_ | Name of the object. | | ||
|`expiry` | _number_ | Expiry time in seconds. Default value is 7 days. | | ||
|`expiry` | _number_ | Expiry time in seconds. Default value is 7 days. (optional) | | ||
|`respHeaders` | _object_ | response headers to override (optional) | | ||
|`requestDate` | _Date_ | A date object, the url will be issued at. Default value is now. (optional) | | ||
|`callback(err, presignedUrl)` | _function_ | Callback function is called with non `null` err value in case of error. `presignedUrl` will be the URL using which the object can be downloaded using GET request. If no callback is passed, a `Promise` is returned. | | ||
@@ -772,0 +776,0 @@ |
@@ -28,3 +28,3 @@ /* | ||
// List all object paths in bucket my-bucketname. | ||
var objectsStream = s3Client.listObjectsV2('my-bucketname', '', true) | ||
var objectsStream = s3Client.listObjectsV2('my-bucketname', '', true,'') | ||
objectsStream.on('data', function(obj) { | ||
@@ -31,0 +31,0 @@ console.log(obj) |
{ | ||
"name": "minio", | ||
"version": "7.0.1", | ||
"version": "7.0.2", | ||
"description": "S3 Compatible Cloud Storage client", | ||
@@ -5,0 +5,0 @@ "main": "./dist/main/minio.js", |
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 too big to display
Sorry, the diff of this file is not supported yet
561477
60
5088