-
Notifications
You must be signed in to change notification settings - Fork 16
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
S3 Bucket endpoints issue #12
Comments
@jwoertink as far as I remember
Can you please check? |
Awesome! so I updated to this: client = Awscr::S3::Client.new("us-west-1", aws_key_id, aws_secret, endpoint: "https://s3-us-west-1.amazonaws.com")
Shrine.configure do |config|
config.storages["avatars"] = Shrine::Storage::S3.new(bucket: "my-bucket/avatars", client: client, public: true)
end This works 🎉 The files upload, and the I guess the only other question is the URL returned is signed with all these query string params. Is there a way to not have that? Right now I'm doing this: uri = URI.parse(result.url)
String.build do |str|
str << "https://"
str << "#{BUCKET}."
str << uri.host.to_s << uri.path
end This matches up with the
|
I'm not sure if this is an issue on the s3 shard or not, but I get this error:
My code looks like this:
The file fails to upload with an error similar to above.
One thing I noticed was that on this bucket, all of the file URLs actually have
bucket.region.aws.com/subfolder
instead ofregion.aws.com/bucket/subfolder
.... So what I did was added theendpoint
option to my clientNow the file actually uploads (though it sets the content-type to octetstream... 🤔 ), but the URL I get back is
which sends me to the S3 error page above.
The text was updated successfully, but these errors were encountered: