Skip to content

s3 presigned_url ignoring :content_type option #721

@MSchmidt

Description

@MSchmidt

I'm trying to sign the :put_object operation with Aws::S3::Presigner but the :content_type option is ignored. Content-Type is neither in the X-Amz-SignedHeaders parameter not anywhere else to be found.

signer = Aws::S3::Presigner.new

@url = signer.presigned_url(:put_object,
  bucket: bucket,
  key: 'test.jpg',
  acl: 'public-read',
  content_type: 'image/png',
  metadata: { "MetadataKey" => "MetadataValue" }
)

generates:

https://bucket.s3.eu-central-1.amazonaws.com/test.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=XXXXXXXXXXXXXXXXXXXX%2F20150227%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20150227T010602Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&x-amz-acl=public-read&x-amz-meta-metadatakey=MetadataValue&X-Amz-Signature=e351ac84cfd552968229da20eacdc1d31f854398a9fa6da44f0f982b6e09d2f9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions