Class: Fizzy::Services::UploadsService

Inherits:
BaseService show all
Defined in:
lib/fizzy/generated/services/uploads_service.rb

Overview

Service for Uploads operations

Instance Method Summary collapse

Methods inherited from BaseService

#initialize

Constructor Details

This class inherits a constructor from Fizzy::Services::BaseService

Instance Method Details

#create_direct(account_id:, filename:, content_type:, byte_size:, checksum:) ⇒ Hash

create_direct operation

Parameters:

  • account_id (String)

    account id ID

  • filename (String)

    filename

  • content_type (String)

    content type

  • byte_size (Integer)

    byte size

  • checksum (String)

    checksum

Returns:

  • (Hash)

    response data



17
18
19
20
21
# File 'lib/fizzy/generated/services/uploads_service.rb', line 17

def create_direct(account_id:, filename:, content_type:, byte_size:, checksum:)
  with_operation(service: "uploads", operation: "CreateDirectUpload", is_mutation: true, resource_id: ) do
    http_post("/#{}/rails/active_storage/direct_uploads", body: compact_params(filename: filename, content_type: content_type, byte_size: byte_size, checksum: checksum)).json
  end
end