You are viewing documentation for version 1 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: AWS::S3::PresignedPost::ConditionBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/aws/s3/presigned_post.rb

Overview

Lets you specify conditions on a field. See #where for usage examples.

Instance Method Summary collapse

Instance Method Details

#in(range) ⇒ Object

Specifies that the value of the field must be in the given range. This may only be used to constrain the :content_length field, e.g. presigned_post.with(:conent_length).in(1..4).



280
281
282
# File 'lib/aws/s3/presigned_post.rb', line 280

def in(range)
  @post.refine(:content_length => range)
end

#is(value) ⇒ Object

Specifies that the value of the field must equal the provided value.



249
250
251
252
253
254
255
# File 'lib/aws/s3/presigned_post.rb', line 249

def is(value)
  if @field == :content_length
    self.in(value)
  else
    @post.with_equality_condition(@field, value)
  end
end

#starts_with(prefix) ⇒ Object

Specifies that the value of the field must begin with the provided value. If you are specifying a condition on the "key" field, note that this check takes place after the ${filename} variable is expanded. This is only valid for the following fields:



272
273
274
# File 'lib/aws/s3/presigned_post.rb', line 272

def starts_with(prefix)
  @post.with_prefix_condition(@field, prefix)
end