Module: Gcloud::Upload

Defined in:
lib/gcloud/upload.rb

Overview

Upload Settings

Upload allows users to configure how files are uploaded to the Google Cloud Service APIs.

require "gcloud/upload"

# Set the default threshold to 10 MiB. Gcloud::Upload.resumable_threshold = 10_000_000

Class Method Summary collapse

Class Method Details

.resumable_thresholdObject

Retrieve resumable threshold. If uploads are larger in size than this value then resumable uploads are used.

The default value is 5 MiB (5,000,000 bytes).


36
37
38
# File 'lib/gcloud/upload.rb', line 36

def self.resumable_threshold
  @@resumable_threshold
end

.resumable_threshold=(new_resumable_threshold) ⇒ Object

Sets a new resumable threshold value.


42
43
44
# File 'lib/gcloud/upload.rb', line 42

def self.resumable_threshold= new_resumable_threshold
  @@resumable_threshold = new_resumable_threshold.to_i
end