const s3Client = new Minio.Client({
endPoint: 'localhost',
accessKey: 'minio',
secretKey: 'minio123',
useSSL: false,
port: 22000,
// region:'us-west-1'
//partSize: 5 * 1024 * 1024,
})
// Create a bucket name my-bucketname-3.
// await s3Client.makeBucket('my-bucketname-3')
// Create a bucket name my-bucketname.
// await s3Client.makeBucket('my-bucketname-2','us-west-1')
// List all object paths in bucket my-bucketname-2. and observe trace for the correct region in request.
var objectsStream = s3Client.listObjects('my-bucketname-2', '', true)
objectsStream.on('data', function (obj) {
console.log(obj)
})
objectsStream.on('error', function (e) {
console.log(e)
})
to change region in MinIO,
mc admin config set local22 region name=us-west-1 && mc admin service restart local22
to reset to default region in MinIO
mc admin config set local22 region name= && mc admin service restart local22
fix use configured region from constructor for makebucket
Fixes https://github.com/minio/minio-js/issues/1292
to change region in MinIO,
to reset to default region in MinIO