Class: Cadenya::Models::UploadSpec

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/cadenya/models/upload_spec.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(content_type:, filename:, size_bytes:) ⇒ Object

Some parameter documentations has been truncated, see Cadenya::Models::UploadSpec for more details.

Parameters:

  • content_type (String)

    MIME type the client will send. Baked into the presigned URL’s signature

  • filename (String)

    Client-supplied filename. Used for audit and display only; does not

  • size_bytes (String)

    Expected size of the upload in bytes. Baked into the presigned URL as a



# File 'lib/cadenya/models/upload_spec.rb', line 27

Instance Attribute Details

#content_typeString

MIME type the client will send. Baked into the presigned URL’s signature — the PUT must match exactly or object storage will reject it.

Returns:

  • (String)


11
# File 'lib/cadenya/models/upload_spec.rb', line 11

required :content_type, String, api_name: :contentType

#filenameString

Client-supplied filename. Used for audit and display only; does not control the object’s storage path.

Returns:

  • (String)


18
# File 'lib/cadenya/models/upload_spec.rb', line 18

required :filename, String

#size_bytesString

Expected size of the upload in bytes. Baked into the presigned URL as a Content-Length constraint.

Returns:

  • (String)


25
# File 'lib/cadenya/models/upload_spec.rb', line 25

required :size_bytes, String, api_name: :sizeBytes