class Aws::S3::Presigned::Form

Defined in:

aws/s3/presigned/form.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(post : Post, client : HTTP::Client) #

Create a form with a Post object and an IO.


[View source]

Class Method Detail

def self.build(region, aws_access_key, aws_secret_key, signer = :v4, &) #

Create a new Form

Building a Form

Aws::S3::Presigned::Form.build("us-east-1", "aws key", "aws secret") do |form|
  form.expiration(Time.utc_now.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

[View source]

Instance Method Detail

def fields #

The fields of the form.


[View source]
def submit(io : IO) #

Submit the Form.


[View source]
def to_html #

Represent this Presigned::Form as raw HTML.


[View source]
def url #

The url of the form.


[View source]