I am trying to upload the file to s3 server, using s3_direct_upload gem. I have followed the instruction in document. But I am unable to upload the file. I am getting following error:
<Code>InvalidRequest</Code>
<Message>The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.</Message>
My bucket region is us-east-2.
And following is my initializer content:
S3DirectUpload.config do |c|
c.access_key_id = ENV["AWS_ACCESS_KEY_ID"]
c.secret_access_key = ENV["AWS_SECRET_ACCESS_KEY"]
c.bucket = ENV["AWS_S3_BUCKET"]
c.region = ENV["AWS_REGION"]
c.url = "https://#{ENV['AWS_S3_BUCKET']}.s3.amazonaws.com"
end