Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix use configured region from constructor for makebucket #1293

Merged
merged 1 commit into from
May 13, 2024

Conversation

prakashsvmx
Copy link
Member

@prakashsvmx prakashsvmx commented May 13, 2024

fix use configured region from constructor for makebucket

Fixes #1292

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

@prakashsvmx prakashsvmx requested a review from kaankabalak May 13, 2024 05:29
@prakashsvmx prakashsvmx self-assigned this May 13, 2024
@prakashsvmx prakashsvmx merged commit fc976b9 into minio:master May 13, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Method makeBucket does not use MinioClient constructor's provided region
2 participants