'Dockerized Minio for local use not accepting files

I would like to use Minio locally to replicate an S3 like storage.

Installed through docker :

sudo docker run \
  -p 9000:9000 \
  -p 9001:9001 \
  --name minio1 \
  -v ~/minio/data:/data \
  -e "MINIO_ROOT_USER=storage" \
  -e "MINIO_ROOT_PASSWORD=my_password" \
  --restart always \
  quay.io/minio/minio server /data --console-address ":9001"

When pinging: http://127.0.0.1:9000 I am redirected to the Minio console where I can create buckets etc ... Though when adding Minio endpoint 127.0.0.1:9000 or localhost:9000 to my Rails app it is not found and I can't upload files.

Is there something I am missing ?

-EDIT-

Endpoint is added through environment variables :

MINIO_ACCESS_KEY='storage'
MINIO_SECRET_KEY='my_password'
MINIO_ENDPOINT='http://127.0.0.1:9000'

And populated into shrine Initializer

s3_options_for_minio = {
  bucket:            "my_bucket", 
  access_key_id:     ENV["MINIO_ACCESS_KEY"],
  secret_access_key: ENV["MINIO_SECRET_KEY"],
  endpoint:          ENV["MINIO_ENDPOINT"],  
  region:            "eu-west-3",
  force_path_style:  true
}

-EDIT 2-

I have set up a remote Minio Docker container (the same way as above) with proper NGINX and SSL certs, and when adding endpoint :

https://my-remote-minio-url/

then everything works perfectly fine. Files do upload.

Also if may help:

  • the Rails app / Shrine presign endpoint works perfectly fine with the local minio and returns a JSON with such data as fields {key, content-disposition, content-type, policy, x-amz-credentials, x-amz-algorithm, x-amz-signature .. }
  • Console returnes something about CSP :

Content Security Policy: The page’s settings blocked the loading of a resource at http://localhost:9000/transfers (“connect-src”).

[Uppy] [16:48:05] Failed to upload 182994086_3808942689174477_1208665971239769189_n.jpg This looks like a network error, the endpoint might be blocked by an internet provider or a firewall.

Source error: [Error: Upload error]

(to explain the error a bit further, "transfers" is the target bucket)

-EDIT 3-

Smmes to be a problem with Uppy, not Minio



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source