I have set the environment variable MINIO_SERVER_URL=http://localhost:9000 to help the Minio console generate pre-signed URLs.
However, the get_presigned_url() function within the Minio client SDK uses the internal container endpoint (minio:9000). As a result, the generated pre-signed URL looks like http://minio:9000/bucket/file.png?, which is not reachable from the host machine.
Proposal
To better support local development environments, I propose adding an optional parameter to the Minio class to specify the minio_server_url. This URL would be used when generating pre-signed URLs, ensuring they are accessible from the host machine.
Is it possible to work on this change and create a PR? I believe this enhancement would significantly improve the developer experience when working with Minio in local environments.
minio-py generates presigned URLs as per endpoint passed to Minio class. If you pass wrong value, it generates wrong URLs. How you use MinIO server is irrelevant here.
Description:
In a local development environment, I am running Minio using Docker Compose with the following configuration:
I have set the environment variable
MINIO_SERVER_URL=http://localhost:9000
to help the Minio console generate pre-signed URLs.However, the
get_presigned_url()
function within the Minio client SDK uses the internal container endpoint(minio:9000)
. As a result, the generated pre-signed URL looks likehttp://minio:9000/bucket/file.png?
, which is not reachable from the host machine.Proposal
To better support local development environments, I propose adding an optional parameter to the Minio class to specify the
minio_server_url
. This URL would be used when generating pre-signed URLs, ensuring they are accessible from the host machine. Is it possible to work on this change and create a PR? I believe this enhancement would significantly improve the developer experience when working with Minio in local environments.