2

I have error when trying to upload files to Minio object-storage server (something similar to AWS S3). My endpoint is using hostname such as example.com, and the bucket is "mybucket". But when I upload file I got error like this :

Error executing "ListObjects" on "http://mybucket.example.com/?prefix=xxxx&max-keys=1&encoding-type=url"; AWS HTTP error: cURL error 6: Could not resolve host: mybucket.example.com 

It seem the lib adding bucket-name in front of server hostname, so it will error on resolving hostname. But this error not happened when I hit upload to the server IP-Address.

Currently I'm using league/flysystem-aws-s3-v3:1.0.29 PHP 7.3.9 Laravel 7.2

1 Answers1

3

Currently the default config is bucket name as subdomain. If you want to use subdirectory style as bucket name, you can use 'use_path_style_endpoint' => true in your config or when manually init S3Client object. You can read related Minio config here:

ariaenggar
  • 111
  • 1
  • 9