-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Hi,
I could be wrong but I think there is a problem with generating a url for an uploaded file when using a custom s3 storage endpoint. I am running Minio locally on my machine and uploading works fine. Unfortunately, when I try to request a download url via UploadedFile#url I get a url that doesn't point to my local Minio server.
I am using it within a Lucky project. Below is my configuration and usage.
# config/shrine.cr
client = Awscr::S3::Client.new(
"minio",
"minioadmin",
"minioadmin",
endpoint: "http://localhost:9000"
)
Shrine.configure do |config|
config.storages["store"] = Shrine::Storage::S3.new(bucket: "day", client: client)
endShrine::UploadedFile.new("7609952bf7b7973b03595c315d728cd9.jpg", "store").url
# => https://s3-minio.amazonaws.com/day/7609952bf7b7973b03595c315d728cd9.jpg?X-Amz-Expires=86400&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minioadmin%2F20210323%2Fminio%2Fs3%2Faws4_request&X-Amz-Date=20210323T083243Z&X-Amz-SignedHeaders=host&X-Amz-Signature=5bafad2cb415d929198ba3b0f9ede9fd78943cef30b81e3711ec16b1baeb6ff3As you can see from the above, I have my endpoint configured to http://localhost:9000 but when I request a url it uses https://s3-minio.amazonaws.com.
Am I doing something wrong or is this a bug? Any help would be appreciated!
Metadata
Metadata
Assignees
Labels
No labels