class

Awscr::S3::Presigned::Form

Inherits Reference < Object

Constructors

new(post : Post, client : HTTP::Client)

Create a form with a Post object and an IO.

Source

Class methods

build(region : String, aws_access_key : String, aws_secret_key : String, aws_session_key : String | Nil = nil, signer : Symbol = :v4, &)

Create a new Form

Building a Form

Awscr::S3::Presigned::Form.build("us-east-1", "aws key", "aws secret") do |form|
  form.expiration(Time.unix(Time.local.to_unix + 1000))
  form.condition("bucket", "my bucket")
  form.condition("acl", "public-read")
  form.condition("key", "helloworld.png")
  form.condition("Content-Type", "image/png")
  form.condition("success_action_status", "201")
end
Source

Instance methods

fields

The fields of the form.

Source
submit(io : IO)

Submit the Form.

Source
to_html

Represent this Presigned::Form as raw HTML.

Source
url

The url of the form.

Source