Class: FilestackConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/filestack/config.rb

Constant Summary collapse

API_URL =
'https://www.filestackapi.com/api'.freeze
CDN_URL =
'https://cdn.filestackcontent.com'.freeze
PROCESS_URL =
'https://process.filestackapi.com'.freeze
MULTIPART_PARAMS =
%w[
  store_location store_region store_container
  store_path store_access
].freeze
DEFAULT_CHUNK_SIZE =
8 * 1024**2
DEFAULT_OFFSET_SIZE =
1 * 1024**2
VERSION =
Filestack::Ruby::VERSION
HEADERS =
{
  'User-Agent' => "filestack-ruby #{VERSION}",
  'Filestack-Source' => "Ruby-#{VERSION}",
  'Content-Type' => "application/json",
  'Accept-Encoding' => "application/json"
}.freeze
DEFAULT_UPLOAD_MIMETYPE =
'application/octet-stream'
INTELLIGENT_ERROR_MESSAGES =
['BACKEND_SERVER', 'BACKEND_NETWORK', 'S3_SERVER', 'S3_NETWORK']

Class Method Summary collapse

Class Method Details

.multipart_commit_url(base_url) ⇒ Object



37
38
39
# File 'lib/filestack/config.rb', line 37

def self.multipart_commit_url(base_url)
  "https://#{base_url}/multipart/commit"
end

.multipart_complete_url(base_url) ⇒ Object



41
42
43
# File 'lib/filestack/config.rb', line 41

def self.multipart_complete_url(base_url)
  "https://#{base_url}/multipart/complete"
end

.multipart_start_urlObject



29
30
31
# File 'lib/filestack/config.rb', line 29

def self.multipart_start_url
  "https://upload.filestackapi.com/multipart/start"
end

.multipart_upload_url(base_url) ⇒ Object



33
34
35
# File 'lib/filestack/config.rb', line 33

def self.multipart_upload_url(base_url)
  "https://#{base_url}/multipart/upload"
end