Global

Members

(constant) AUTO_RETRY_DEFAULT :boolean

Default behavior: Automatically retry retriable server errors.

(constant) CRC32C_EXTENSIONS

(constant) DEFAULT_PARALLEL_CHUNKED_DOWNLOAD_LIMIT

Default number of concurrently executing promises to use when calling downloadFileInChunks.

(constant) DEFAULT_PARALLEL_DOWNLOAD_LIMIT

Default number of concurrently executing promises to use when calling downloadManyFiles.

(constant) DEFAULT_PARALLEL_UPLOAD_LIMIT

Default number of concurrently executing promises to use when calling uploadManyFiles.

(constant) DOWNLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE

The chunk size in bytes to use when calling downloadFileInChunks.

(constant) DOWNLOAD_IN_CHUNKS_FILE_SIZE_THRESHOLD

The minimum size threshold in bytes at which to apply a chunked download strategy when calling downloadFileInChunks.

(constant) MAX_RETRY_DEFAULT :number

Default behavior: Only attempt to retry retriable errors 3 times.

(constant) MAX_RETRY_DELAY_DEFAULT :number

Default behavior: Wait no more than 64 seconds between retries.

(constant) RETRYABLE_ERR_FN_DEFAULT

Returns true if the API request should be retried, given the error that was given the first time the request was attempted.

(constant) RETRY_DELAY_MULTIPLIER_DEFAULT :number

Default behavior: Wait twice as long as previous retry before retrying.

(constant) TOTAL_TIMEOUT_DEFAULT :number

Default behavior: If the operation doesn't succeed after 600 seconds, stop retrying.

Methods

convertObjKeysToSnakeCase(obj) → {object}

Converts the given objects keys to snake_case

Parameters:
Name Type Description
obj object

object to convert keys to snake case.

Returns:
Type Description
object

object with keys converted to snake case.

encodeURI(uri, booleanopt) → {string}

URI encode uri for generating signed URLs, using fixedEncodeURIComponent.

Encode every byte except A-Z a-Z 0-9 ~ - . _.

Parameters:
Name Type Attributes Default Description
uri string

The URI to encode.

boolean <optional>
false

encodeSlash If true, the "/" character is not encoded.

Returns:
Type Description
string

The encoded string.

fixedEncodeURIComponent(str) → {string}

Encode str with encodeURIComponent, plus these reserved characters: ! * ' ( ).

See MDN: fixedEncodeURIComponent

Parameters:
Name Type Description
str string

The URI component to encode.

Returns:
Type Description
string

The encoded string.

formatAsUTCISO(dateTimeToFormat, includeTime, dateDelimiter, timeDelimiter) → {string}

Formats the provided date object as a UTC ISO string.

Parameters:
Name Type Default Description
dateTimeToFormat Date

date object to be formatted.

includeTime boolean false

flag to include hours, minutes, seconds in output.

dateDelimiter string

delimiter between date components.

timeDelimiter string

delimiter between time components.

Returns:
Type Description
string

UTC ISO format of provided date obect.

objectEntries()

Flatten an object into an Array of arrays, [[key, value], ..]. Implements Object.entries() for Node.js <8

qsStringify(url) → {string}

Serialize an object to a URL query string using util.encodeURI(uri, true).

Parameters:
Name Type Description
url string

The object to serialize.

Returns:
Type Description
string

Serialized string.

unicodeJSONStringify(obj) → {string}

JSON encode str, with unicode \u+ representation.

Parameters:
Name Type Description
obj object

The object to encode.

Returns:
Type Description
string

Serialized string.

Type Definitions

AddAclCallback(errnullable, acl, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

acl object

The Acl Objects.

apiResponse object

The full API response.

AddAclResponse

Properties:
Name Type Description
0 object

The Acl Objects.

1 object

The full API response.

AddLifecycleRuleOptions

Configuration options for Bucket#addLifecycleRule().

Properties:
Name Type Attributes Default Description
append boolean <optional>
true

The new rules will be appended to any pre-existing rules.

BucketExistsCallback(errnullable, exists)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

exists boolean

Whether the Bucket exists.

BucketExistsOptions

Configuration options for Bucket#exists().

Properties:
Name Type Attributes Description
userProject string <optional>

The ID of the project which will be billed for the request.

BucketExistsResponse

Properties:
Name Type Description
0 boolean

Whether the Bucket exists.

BucketLockCallback(errnullable, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

apiResponse object

The full API response.

CRC32CValidator

Properties:
Type Description
Crc32cGeneratorToStringCallback
Crc32cGeneratorValidateCallback
Crc32cGeneratorUpdateCallback

CRC32CValidator

Properties:
Type Description
Crc32cGeneratorToStringCallback
Crc32cGeneratorValidateCallback
Crc32cGeneratorUpdateCallback

CRC32CValidator

Properties:
Type Description
Crc32cGeneratorToStringCallback
Crc32cGeneratorValidateCallback
Crc32cGeneratorUpdateCallback

CombineCallback(errnullable, newFile, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

newFile File

The new File.

apiResponse object

The full API response.

CombineOptions

Properties:
Name Type Attributes Description
kmsKeyName string <optional>

Resource name of the Cloud KMS key, of the form projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overwrites the object metadata's kms_key_name value, if any.

userProject string <optional>

The ID of the project which will be billed for the request.

CombineResponse

Properties:
Name Type Description
0 File

The new File.

1 object

The full API response.

CopyCallback(errnullable, copiedFile, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

copiedFile File

The copied File.

apiResponse object

The full API response.

CopyOptions

Configuration options for File#copy(). See an Object resource.

Properties:
Name Type Attributes Description
cacheControl string <optional>

The cacheControl setting for the new file.

contentEncoding string <optional>

The contentEncoding setting for the new file.

contentType string <optional>

The contentType setting for the new file.

destinationKmsKeyName string <optional>

Resource name of the Cloud KMS key, of the form projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overwrites the object metadata's kms_key_name value, if any.

metadata Metadata <optional>

Metadata to specify on the copied file.

predefinedAcl string <optional>

Set the ACL for the new file.

token string <optional>

A previously-returned rewriteToken from an unfinished rewrite request.

userProject string <optional>

The ID of the project which will be billed for the request.

CopyResponse

Properties:
Name Type Description
0 File

The copied File.

1 object

The full API response.

Cors

Properties:
Name Type Attributes Description
maxAgeSeconds number <optional>

The number of seconds the browser is allowed to make requests before it must repeat the preflight request.

method Array.<string> <optional>

HTTP method allowed for cross origin resource sharing with this bucket.

origin Array.<string> <optional>

an origin allowed for cross origin resource sharing with this bucket.

responseHeader Array.<string> <optional>

A header allowed for cross origin resource sharing with this bucket.

Crc32cGeneratorCallback() → {CRC32CValidator}

Returns:
Type Description
CRC32CValidator

Crc32cGeneratorCallback() → {CRC32CValidator}

Returns:
Type Description
CRC32CValidator

Crc32cGeneratorToStringCallback() → {string}

Returns:
Type Description
string
Example
Hashing the string 'data' should return 'rth90Q=='

```js
const buffer = Buffer.from('data');
crc32c.update(buffer);
crc32c.toString(); // 'rth90Q=='
```

Crc32cGeneratorToStringCallback() → {string}

Returns:
Type Description
string
Example
Hashing the string 'data' should return 'rth90Q=='

```js
const buffer = Buffer.from('data');
crc32c.update(buffer);
crc32c.toString(); // 'rth90Q=='
```

Crc32cGeneratorToStringCallback() → {string}

Returns:
Type Description
string
Example
Hashing the string 'data' should return 'rth90Q=='

```js
const buffer = Buffer.from('data');
crc32c.update(buffer);
crc32c.toString(); // 'rth90Q=='
```

Crc32cGeneratorUpdateCallback(dataopt) → {undefined}

Parameters:
Name Type Attributes Description
data Buffer <optional>

data to update CRC32C value with

Returns:
Type Description
undefined
Example
Hashing buffers from 'some ' and 'text\n'

```js
const buffer1 = Buffer.from('some ');
crc32c.update(buffer1);

const buffer2 = Buffer.from('text\n');
crc32c.update(buffer2);

crc32c.toString(); // 'DkjKuA=='
```

Crc32cGeneratorUpdateCallback(dataopt) → {undefined}

Parameters:
Name Type Attributes Description
data Buffer <optional>

data to update CRC32C value with

Returns:
Type Description
undefined
Example
Hashing buffers from 'some ' and 'text\n'

```js
const buffer1 = Buffer.from('some ');
crc32c.update(buffer1);

const buffer2 = Buffer.from('text\n');
crc32c.update(buffer2);

crc32c.toString(); // 'DkjKuA=='
```

Crc32cGeneratorUpdateCallback(dataopt) → {undefined}

Parameters:
Name Type Attributes Description
data Buffer <optional>

data to update CRC32C value with

Returns:
Type Description
undefined
Example
Hashing buffers from 'some ' and 'text\n'

```js
const buffer1 = Buffer.from('some ');
crc32c.update(buffer1);

const buffer2 = Buffer.from('text\n');
crc32c.update(buffer2);

crc32c.toString(); // 'DkjKuA=='
```

Crc32cGeneratorValidateCallback(valueopt) → {boolean}

Parameters:
Name Type Attributes Description
value string <optional>

base64-encoded CRC32C string to validate

Returns:
Type Description
boolean
Example
Should return `true` if the value matches, `false` otherwise

```js
const buffer = Buffer.from('data');
crc32c.update(buffer);
crc32c.validate('DkjKuA=='); // false
crc32c.validate('rth90Q=='); // true
```

Crc32cGeneratorValidateCallback(valueopt) → {boolean}

Parameters:
Name Type Attributes Description
value string <optional>

base64-encoded CRC32C string to validate

Returns:
Type Description
boolean
Example
Should return `true` if the value matches, `false` otherwise

```js
const buffer = Buffer.from('data');
crc32c.update(buffer);
crc32c.validate('DkjKuA=='); // false
crc32c.validate('rth90Q=='); // true
```

Crc32cGeneratorValidateCallback(valueopt) → {boolean}

Parameters:
Name Type Attributes Description
value string <optional>

base64-encoded CRC32C string to validate

Returns:
Type Description
boolean
Example
Should return `true` if the value matches, `false` otherwise

```js
const buffer = Buffer.from('data');
crc32c.update(buffer);
crc32c.validate('DkjKuA=='); // false
crc32c.validate('rth90Q=='); // true
```

CreateBucketCallback(errnullable, bucket, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

bucket Bucket

The new Bucket.

apiResponse object

The full API response.

CreateBucketRequest

Metadata to set for the bucket.

Properties:
Name Type Attributes Default Description
archive boolean <optional>
false

Specify the storage class as Archive.

autoclass.enabled object <optional>
false

Specify whether Autoclass is enabled for the bucket.

coldline boolean <optional>
false

Specify the storage class as Coldline.

cors Array.<Cors> <optional>
[]

Specify the CORS configuration to use.

customPlacementConfig CustomPlacementConfig <optional>
{}

Specify the bucket's regions for dual-region buckets. For more information, see Bucket Locations.

dra boolean <optional>
false

Specify the storage class as Durable Reduced Availability.

location string <optional>

Specify the bucket's location. If specifying a dual-region, the customPlacementConfig property should be set in conjunction. For more information, see Bucket Locations.

multiRegional boolean <optional>
false

Specify the storage class as Multi-Regional.

nearline boolean <optional>
false

Specify the storage class as Nearline.

regional boolean <optional>
false

Specify the storage class as Regional.

requesterPays boolean <optional>
false

Early Access Testers Only Force the use of the User Project metadata field to assign operational costs when an operation is made on a Bucket and its objects.

rpo string <optional>

For dual-region buckets, controls whether turbo replication is enabled (ASYNC_TURBO) or disabled (DEFAULT).

standard boolean <optional>
true

Specify the storage class as Standard.

storageClass string <optional>

The new storage class. (standard, nearline, coldline, or archive). Note: The storage classes multi_regional, regional, and durable_reduced_availability are now legacy and will be deprecated in the future.

versioning Versioning <optional>

Specify the versioning status.

userProject string <optional>

The ID of the project which will be billed for the request.

CreateBucketResponse

Properties:
Name Type Description
0 Bucket

The new Bucket.

1 object

The full API response.

CreateChannelCallback(errnullable, channel, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

channel Channel

The new Channel.

apiResponse object

The full API response.

CreateChannelConfig

Properties:
Name Type Attributes Default Description
address string

The address where notifications are delivered for this channel.

delimiter string <optional>

Returns results in a directory-like mode.

maxResults number <optional>

Maximum number of items plus prefixes to return in a single page of responses.

pageToken string <optional>

A previously-returned page token representing part of the larger set of results to view.

prefix string <optional>

Filter results to objects whose names begin with this prefix.

projection string <optional>
noAcl

Set of properties to return.

userProject string <optional>

The ID of the project which will be billed for the request.

versions boolean <optional>
false

If true, lists all versions of an object as distinct results.

CreateChannelOptions

Properties:
Name Type Attributes Description
userProject string <optional>

The ID of the project which will be billed for the request.

CreateChannelResponse

Properties:
Name Type Description
0 Channel

The new Channel.

1 object

The full API response.

CreateHmacKeyCallback(errnullable, hmacKey, secret, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

hmacKey HmacKey

The HmacKey instance created from API response.

secret string

The HMAC key's secret used to access the XML API.

apiResponse object

The raw API response.

CreateHmacKeyOptions

Properties:
Name Type Attributes Description
projectId string <optional>

The project ID of the project that owns the service account of the requested HMAC key. If not provided, the project ID used to instantiate the Storage client will be used.

userProject string <optional>

This parameter is currently ignored.

CreateHmacKeyResponse

Properties:
Name Type Description
0 HmacKey

The HmacKey instance created from API response.

1 string

The HMAC key's secret used to access the XML API.

3 object

The raw API response.

CreateNotificationCallback(errnullable, notification, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

notification Notification

The new Notification.

apiResponse object

The full API response.

CreateNotificationOptions

Metadata to set for the Notification.

Properties:
Name Type Attributes Description
customAttributes object <optional>

An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.

eventTypes Array.<string> <optional>

If present, only send notifications about listed event types. If empty, sent notifications for all event types.

objectNamePrefix string <optional>

If present, only apply this notification configuration to object names that begin with this prefix.

payloadFormat string <optional>

The desired content of the Payload. Defaults to JSON_API_V1.

Acceptable values are:

  • JSON_API_V1

  • NONE

userProject string <optional>

The ID of the project which will be billed for the request.

CreateNotificationResponse

Properties:
Name Type Description
0 Notification

The new Notification.

1 object

The full API response.

CreateReadStreamOptions

Configuration options for File#createReadStream.

Properties:
Name Type Attributes Default Description
userProject string <optional>

The ID of the project which will be billed for the request.

validation string | boolean <optional>

Possible values: "md5", "crc32c", or false. By default, data integrity is validated with a CRC32c checksum. You may use MD5 if preferred, but that hash is not supported for composite objects. An error will be raised if MD5 is specified but is not available. You may also choose to skip validation completely, however this is not recommended.

start number <optional>

A byte offset to begin the file's download from. Default is 0. NOTE: Byte ranges are inclusive; that is, options.start = 0 and options.end = 999 represent the first 1000 bytes in a file or object. NOTE: when specifying a byte range, data integrity is not available.

end number <optional>

A byte offset to stop reading the file at. NOTE: Byte ranges are inclusive; that is, options.start = 0 and options.end = 999 represent the first 1000 bytes in a file or object. NOTE: when specifying a byte range, data integrity is not available.

decompress boolean <optional>
true

Disable auto decompression of the received data. By default this option is set to true. Applicable in cases where the data was uploaded with gzip: true option. See File#createWriteStream.

CreateResumableUploadCallback(errnullable, uri)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

uri string

The resumable upload's unique session URI.

CreateResumableUploadOptions

Properties:
Name Type Attributes Description
metadata object <optional>

Metadata to set on the file.

offset number <optional>

The starting byte of the upload stream for resuming an interrupted upload.

origin string <optional>

Origin header to set for the upload.

predefinedAcl string <optional>

Apply a predefined set of access controls to this object.

Acceptable values are:

  • authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access.

  • bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access.

  • bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access.

  • private - Object owner gets OWNER access.

  • projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles.

  • publicRead - Object owner gets OWNER access, and allUsers get READER access.

private boolean <optional>

Make the uploaded file private. (Alias for options.predefinedAcl = 'private')

public boolean <optional>

Make the uploaded file public. (Alias for options.predefinedAcl = 'publicRead')

userProject string <optional>

The ID of the project which will be billed for the request.

chunkSize string <optional>

Create a separate request per chunk. This value is in bytes and should be a multiple of 256 KiB (2^18). We recommend using at least 8 MiB for the chunk size.

CreateResumableUploadResponse

Properties:
Name Type Description
0 string

The resumable upload's unique session URI.

CreateWriteStreamOptions

Configuration options for File#createWriteStream().

Properties:
Name Type Attributes Default Description
contentType string <optional>

Alias for options.metadata.contentType. If set to auto, the file name is used to determine the contentType.

gzip string | boolean <optional>

If true, automatically gzip the file. If set to auto, the contentType is used to determine if the file should be gzipped. This will set options.metadata.contentEncoding to gzip if necessary.

metadata object <optional>

See the examples below or Objects: insert request body for more details.

offset number <optional>

The starting byte of the upload stream, for resuming an interrupted upload. Defaults to 0.

predefinedAcl string <optional>

Apply a predefined set of access controls to this object.

Acceptable values are:

  • authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access.

  • bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access.

  • bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access.

  • private - Object owner gets OWNER access.

  • projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles.

  • publicRead - Object owner gets OWNER access, and allUsers get READER access.

private boolean <optional>

Make the uploaded file private. (Alias for options.predefinedAcl = 'private')

public boolean <optional>

Make the uploaded file public. (Alias for options.predefinedAcl = 'publicRead')

resumable boolean <optional>

Force a resumable upload. NOTE: When working with streams, the file format and size is unknown until it's completely consumed. Because of this, it's best for you to be explicit for what makes sense given your input.

timeout number <optional>
60000

Set the HTTP request timeout in milliseconds. This option is not available for resumable uploads. Default: 60000

uri string <optional>

The URI for an already-created resumable upload. See File#createResumableUpload.

userProject string <optional>

The ID of the project which will be billed for the request.

validation string | boolean <optional>

Possible values: "md5", "crc32c", or false. By default, data integrity is validated with a CRC32c checksum. You may use MD5 if preferred, but that hash is not supported for composite objects. An error will be raised if MD5 is specified but is not available. You may also choose to skip validation completely, however this is not recommended. In addition to specifying validation type, providing metadata.crc32c or metadata.md5Hash will cause the server to perform validation in addition to client validation. NOTE: Validation is automatically skipped for objects that were uploaded using the gzip option and have already compressed content.

DeleteBucketCallback(errnullable, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

apiResponse object

The full API response.

DeleteBucketResponse

Properties:
Name Type Description
0 object

The full API response.

DeleteFileCallback(errnullable, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

apiResponse object

The full API response.

DeleteFileResponse

Properties:
Name Type Description
0 object

The full API response.

DeleteFilesCallback(err, apiResponseopt)

Parameters:
Name Type Attributes Description
err Error | ?Array.<Error>

Request error, if any, or array of errors from files that were not able to be deleted.

apiResponse object <optional>

The full API response.

DeleteFilesOptions

Query object. See Bucket#getFiles for all of the supported properties.

Properties:
Name Type Attributes Description
force boolean <optional>

Suppress errors until all files have been processed.

DeleteHmacKeyCallback(errnullable, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

apiResponse object

The full API response.

DeleteHmacKeyOptions

Properties:
Name Type Attributes Description
userProject string <optional>

This parameter is currently ignored.

DeleteHmacKeyResponse

Properties:
Name Type Description
0 object

The full API response.

DeleteLabelsCallback(errnullable, metadata)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

metadata object

Bucket's metadata.

DeleteLabelsResponse

Properties:
Name Type Description
0 object

The full API response.

DeleteNotificationResponse

Properties:
Name Type Description
0 object

The full API response.

DisableRequesterPaysCallback(errnullable, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

apiResponse object

The full API response.

DisableRequesterPaysResponse

Properties:
Name Type Description
0 object

The full API response.

DownloadCallback(err, contents)

Parameters:
Name Type Description
err

Request error, if any.

contents

The contents of a File.

DownloadFileInChunksOptions

Properties:
Name Type Attributes Description
concurrencyLimit number <optional>

The number of concurrently executing promises to use when downloading the file.

chunkSizeBytes number <optional>

The size in bytes of each chunk to be downloaded.

validation string | boolean <optional>

Whether or not to perform a CRC32C validation check when download is complete.

DownloadManyFilesOptions

Properties:
Name Type Attributes Description
concurrencyLimit number <optional>

The number of concurrently executing promises to use when downloading the files.

prefix string <optional>

A prefix to append to all of the downloaded files.

stripPrefix string <optional>

A prefix to remove from all of the downloaded files.

passthroughOptions object <optional>

DownloadOptions Options to be passed through to each individual download operation.

DownloadResponse

Properties:
Name Type Attributes Description
0 <optional>

The contents of a File.

EnableLoggingOptions

Configuration object for enabling logging.

Properties:
Name Type Attributes Description
bucket string | Bucket <optional>

The bucket for the log entries. By default, the current bucket is used.

prefix string

A unique prefix for log object names.

EnableRequesterPaysCallback(errnullable, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

apiResponse object

The full API response.

EnableRequesterPaysResponse

Properties:
Name Type Description
0 object

The full API response.

Expr

Properties:
Name Type Attributes Description
title string <optional>

An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.

description string <optional>

An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.

expression string

Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported.The condition that is associated with this binding.

See:
  • [Condition] https://cloud.google.com/storage/docs/access-control/iam#conditions

FileExistsCallback(errnullable, exists)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

exists boolean

Whether the File exists.

FileExistsResponse

Properties:
Name Type Description
0 boolean

Whether the File exists.

FileOptions

Options passed to the File constructor.

Properties:
Name Type Attributes Description
encryptionKey string <optional>

A custom encryption key.

generation number <optional>

Generation to scope the file to.

kmsKeyName string <optional>

Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key. Limited availability; usable only by enabled projects.

userProject string <optional>

The ID of the project which will be billed for all requests made from File object.

callback Crc32cGeneratorCallback <optional>

A function that generates a CRC32C Validator. Defaults to CRC32C

GenerateSignedPostPolicyV2Callback(errnullable, policy)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

policy object

The document policy.

GenerateSignedPostPolicyV2Response

Properties:
Name Type Description
0 object

The document policy.

GenerateSignedPostPolicyV4Callback(errnullable, output)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

output SignedPostPolicyV4Output

An object containing the request URL and form fields.

GenerateSignedPostPolicyV4Response

Properties:
Name Type Description
0 SignedPostPolicyV4Output

An object containing the request URL and form fields.

GetAclCallback(errnullable, acl, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

acl object | Array.<object>

Single or array of Acl Objects.

apiResponse object

The full API response.

GetAclResponse

Properties:
Name Type Description
0 object | Array.<object>

Single or array of Acl Objects.

1 object

The full API response.

GetBucketCallback(errnullable, bucket, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

bucket Bucket

The Bucket.

apiResponse object

The full API response.

GetBucketMetadataCallback(errnullable, metadata, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

metadata object

The bucket metadata.

apiResponse object

The full API response.

GetBucketMetadataOptions

Configuration options for Bucket#getMetadata().

Properties:
Name Type Attributes Description
userProject string <optional>

The ID of the project which will be billed for the request.

GetBucketMetadataResponse

Properties:
Name Type Description
0 object

The bucket metadata.

1 object

The full API response.

GetBucketOptions

Configuration options for Bucket#get()

Properties:
Name Type Attributes Description
autoCreate boolean <optional>

Automatically create the object if it does not exist. Default: false

userProject string <optional>

The ID of the project which will be billed for the request.

GetBucketResponse

Properties:
Name Type Description
0 Bucket

The Bucket.

1 object

The full API response.

GetBucketSignedUrlConfig

Properties:
Name Type Attributes Default Description
action string

Currently only supports "list" (HTTP: GET).

expires *

A timestamp when this link will expire. Any value given is passed to new Date(). Note: 'v4' supports maximum duration of 7 days (604800 seconds) from now.

version string <optional>
'v2'

The signing version to use, either 'v2' or 'v4'.

virtualHostedStyle boolean <optional>
false

Use virtual hosted-style URLs ('https://mybucket.storage.googleapis.com/...') instead of path-style ('https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs should generally be preferred instaed of path-style URL. Currently defaults to false for path-style, although this may change in a future major-version release.

cname string <optional>

The cname for this bucket, i.e., "https://cdn.example.com". See reference

extensionHeaders object <optional>

If these headers are used, the server will check to make sure that the client provides matching values. See Canonical extension headers for the requirements of this feature, most notably:

  • The header name must be prefixed with x-goog-
  • The header name must be all lowercase

Note: Multi-valued header passed as an array in the extensionHeaders object is converted into a string, delimited by , with no space. Requests made using the signed URL will need to delimit multi-valued headers using a single , as well, or else the server will report a mismatched signature.

queryParams object <optional>

Additional query parameters to include in the signed URL.

GetBucketsCallback(errnullable, buckets, nextQuery, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

buckets Array.<Bucket>

Array of Bucket instances.

nextQuery object

A query object to receive more results.

apiResponse object

The full API response.

GetBucketsRequest

Query object for listing buckets.

Properties:
Name Type Attributes Default Description
autoPaginate boolean <optional>
true

Have pagination handled automatically.

maxApiCalls number <optional>

Maximum number of API calls to make.

maxResults number <optional>

Maximum number of items plus prefixes to return per call. Note: By default will handle pagination automatically if more than 1 page worth of results are requested per call. When autoPaginate is set to false the smaller of maxResults or 1 page of results will be returned per call.

pageToken string <optional>

A previously-returned page token representing part of the larger set of results to view.

userProject string <optional>

The ID of the project which will be billed for the request.

GetBucketsResponse

Properties:
Name Type Description
0 Array.<Bucket>

Array of Bucket instances.

1 object

nextQuery A query object to receive more results.

2 object

The full API response.

GetExpirationDateCallback(errnullable, expirationDate)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

expirationDate date

A Date object representing the earliest time this file's retention policy will expire.

GetExpirationDateResponse

Properties:
Name Type Description
0 date

A Date object representing the earliest time this file's retention policy will expire.

GetFileCallback(errnullable, file, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

file File

The File.

apiResponse object

The full API response.

GetFileMetadataCallback(errnullable, metadata, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

metadata object

The File metadata.

apiResponse object

The full API response.

GetFileMetadataResponse

Properties:
Name Type Description
0 object

The File metadata.

1 object

The full API response.

GetFileResponse

Properties:
Name Type Description
0 File

The File.

1 object

The full API response.

GetFilesCallback(errnullable, files, nextQuery, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

files Array.<File>

Array of File instances.

nextQuery object

A query object to receive more results.

apiResponse object

The full API response.

GetFilesOptions

Query object for listing files.

Properties:
Name Type Attributes Default Description
autoPaginate boolean <optional>
true

Have pagination handled automatically.

delimiter string <optional>

Results will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name truncated after the delimiter, returned in apiResponse.prefixes. Duplicate prefixes are omitted.

endOffset string <optional>

Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed have names between startOffset (inclusive) and endOffset (exclusive).

includeTrailingDelimiter boolean <optional>

If true, objects that end in exactly one instance of delimiter have their metadata included in items[] in addition to the relevant part of the object name appearing in prefixes[].

prefix string <optional>

Filter results to objects whose names begin with this prefix.

matchGlob string <optional>

A glob pattern used to filter results, for example foo*bar

maxApiCalls number <optional>

Maximum number of API calls to make.

maxResults number <optional>

Maximum number of items plus prefixes to return per call. Note: By default will handle pagination automatically if more than 1 page worth of results are requested per call. When autoPaginate is set to false the smaller of maxResults or 1 page of results will be returned per call.

pageToken string <optional>

A previously-returned page token representing part of the larger set of results to view.

startOffset string <optional>

Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed have names between startOffset (inclusive) and endOffset (exclusive).

userProject string <optional>

The ID of the project which will be billed for the request.

versions boolean <optional>

If true, returns File objects scoped to their versions.

GetFilesResponse

Properties:
Name Type Description
0 Array.<File>

Array of File instances.

GetHmacKeyCallback(errnullable, hmacKey, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

hmacKey HmacKey

this HmacKey instance.

apiResponse object

The full API response.

GetHmacKeyMetadataOptions

Properties:
Name Type Attributes Description
userProject string <optional>

This parameter is currently ignored.

GetHmacKeyOptions

Properties:
Name Type Attributes Description
userProject string <optional>

This parameter is currently ignored.

GetHmacKeyResponse

Properties:
Name Type Description
0 HmacKey

This HmacKey instance.

1 object

The full API response.

GetLabelsCallback(errnullable, labels)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

labels object

Object of labels currently set on this bucket.

GetLabelsOptions

Configuration options for Bucket#getLabels().

GetLabelsResponse

Properties:
Name Type Description
0 object

Object of labels currently set on this bucket.

GetNotificationsCallback(errnullable, notifications, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

notifications Array.<Notification>

Array of Notification instances.

apiResponse object

The full API response.

GetNotificationsOptions

Configuration options for Bucket#getNotification().

Properties:
Name Type Attributes Description
userProject string <optional>

The ID of the project which will be billed for the request.

GetNotificationsResponse

Properties:
Name Type Description
0 Array.<Notification>

Array of Notification instances.

1 object

The full API response.

GetPolicyOptions

Requested options for IAM#getPolicy().

Properties:
Name Type Attributes Description
requestedPolicyVersion number <optional>

The version of IAM policies to request. If a policy with a condition is requested without setting this, the server will return an error. This must be set to a value of 3 to retrieve IAM policies containing conditions. This is to prevent client code that isn't aware of IAM conditions from interpreting and modifying policies incorrectly. The service might return a policy with version lower than the one that was requested, based on the feature syntax in the policy fetched. See IAM Policy versions

userProject string <optional>

The ID of the project which will be billed for the request.

GetPolicyResponse

Properties:
Name Type Description
0 Policy

The policy.

1 object

The full API response.

GetServiceAccountCallback(errnullable, serviceAccount, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

serviceAccount object

The serviceAccount resource.

Properties
Name Type Description
emailAddress string

The service account email address.

apiResponse object

The full API response.

GetServiceAccountResponse

Properties:
Name Type Description
0 object

The service account resource.

1 object

The full API response.

GetSignedUrlCallback(errnullable, url)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

url object

The signed URL.

GetSignedUrlCallback(errnullable, url)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

url object

The signed URL.

GetSignedUrlResponse

Properties:
Name Type Description
0 object

The signed URL.

GetSignedUrlResponse

Properties:
Name Type Description
0 object

The signed URL.

HmacKeyMetadata

Properties:
Name Type Attributes Description
accessId string

The access id identifies which HMAC key was used to sign a request when authenticating with HMAC.

etag string

Used to perform a read-modify-write of the key.

id string

The resource name of the HMAC key.

projectId string

The project ID.

serviceAccountEmail string

The service account's email this HMAC key is created for.

state string

The state of this HMAC key. One of "ACTIVE", "INACTIVE" or "DELETED".

timeCreated string

The creation time of the HMAC key in RFC 3339 format.

updated string <optional>

The time this HMAC key was last updated in RFC 3339 format.

HmacKeyMetadataCallback(errnullable, metadata, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

metadata HmacKeyMetadata

The updated HmacKeyMetadata object.

apiResponse object

The full API response.

HmacKeyMetadataResponse

Properties:
Name Type Description
0 HmacKeyMetadata

The updated HmacKeyMetadata object.

1 object

The full API response.

HmacKeyOptions

Properties:
Name Type Attributes Description
projectId string <optional>

The project ID of the project that owns the service account of the requested HMAC key. If not provided, the project ID used to instantiate the Storage client will be used.

IsPublicCallback(errnullable, resp)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

resp boolean

Whether file is public or not.

IsPublicResponse

Properties:
Name Type Description
0 boolean

Whether file is public or not.

LifecycleRule

The new lifecycle rule to be added to objects in this bucket.

Properties:
Name Type Attributes Description
action string | object

The action to be taken upon matching of all the conditions 'delete', 'setStorageClass', or 'AbortIncompleteMultipartUpload'. Note: For configuring a raw-formatted rule object to be passed as action please refer to the examples.

condition object

Condition a bucket must meet before the action occurs on the bucket. Refer to following supported conditions.

storageClass string <optional>

When using the setStorageClass action, provide this option to dictate which storage class the object should update to. Please see SetStorageClass option documentation for supported transitions.

MakeAllFilesPublicPrivateResponse

Properties:
Name Type Description
0 Array.<File>

List of files affected.

MakeBucketPrivateCallback(errnullable, files)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

files Array.<File>

List of files made private.

MakeBucketPrivateOptions

Properties:
Name Type Attributes Default Description
includeFiles boolean <optional>
false

Make each file in the bucket private.

metadata Metadata <optional>

Define custom metadata properties to define along with the operation.

force boolean <optional>

Queue errors occurred while making files private until all files have been processed.

userProject string <optional>

The ID of the project which will be billed for the request.

MakeBucketPrivateResponse

Properties:
Name Type Description
0 Array.<File>

List of files made private.

MakeBucketPublicCallback(errnullable, files)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

files Array.<File>

List of files made public.

MakeBucketPublicOptions

Properties:
Name Type Attributes Default Description
includeFiles boolean <optional>
false

Make each file in the bucket private.

force boolean <optional>

Queue errors occurred while making files private until all files have been processed.

MakeBucketPublicResponse

Properties:
Name Type Description
0 Array.<File>

List of files made public.

MakeFilePrivateCallback(errnullable, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

apiResponse object

The full API response.

MakeFilePrivateOptions

Configuration options for File#makePrivate().

Properties:
Name Type Attributes Description
metadata Metadata <optional>

Define custom metadata properties to define along with the operation.

strict boolean <optional>

If true, set the file to be private to only the owner user. Otherwise, it will be private to the project.

userProject string <optional>

The ID of the project which will be billed for the request.

MakeFilePrivateResponse

Properties:
Name Type Description
0 object

The full API response.

MakeFilePublicCallback(errnullable, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

apiResponse object

The full API response.

MakeFilePublicResponse

Properties:
Name Type Description
0 object

The full API response.

MoveCallback(errnullable, destinationFilenullable, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

destinationFile File <nullable>

The destination File.

apiResponse object

The full API response.

MoveOptions

Configuration options for File#move(). See an Object resource.

MoveResponse

Properties:
Name Type Description
0 File

The destination File.

1 object

The full API response.

NotificationExistsCallback(errnullable, exists)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

exists boolean

Whether the notification exists or not.

NotificationExistsResponse

Properties:
Name Type Description
0 boolean

Whether the notification exists or not.

Policy

Properties:
Name Type Attributes Description
policy.bindings Array.<PolicyBinding>

Bindings associate members with roles.

policy.etag string <optional>

Etags are used to perform a read-modify-write.

policy.version number <optional>

The syntax schema version of the Policy. To set an IAM policy with conditional binding, this field must be set to 3 or greater. See IAM Policy versions

PolicyBinding

Properties:
Name Type Attributes Description
role string

Role that is assigned to members.

members Array.<string>

Specifies the identities requesting access for the bucket.

condition Expr <optional>

The condition that is associated with this binding.

RemoveAclCallback(errnullable, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

apiResponse object

The full API response.

RemoveAclResponse

Properties:
Name Type Description
0 object

The full API response.

RenameCallback(errnullable, destinationFilenullable, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

destinationFile File <nullable>

The destination File.

apiResponse object

The full API response.

RenameOptions

Configuration options for File#move(). See an Object resource.

RenameResponse

Properties:
Name Type Description
0 File

The destination File.

1 object

The full API response.

RotateEncryptionKeyCallback()

RotateEncryptionKeyResponse

SaveCallback(errnullable)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

SaveOptions

SetBucketMetadataCallback(errnullable, metadata)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

metadata object

The bucket metadata.

SetBucketMetadataOptions

Configuration options for Bucket#setMetadata().

Properties:
Name Type Attributes Description
userProject string <optional>

The ID of the project which will be billed for the request.

SetBucketMetadataResponse

Properties:
Name Type Description
apiResponse object

The full API response.

SetBucketStorageClassCallback(errnullable)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

SetBucketStorageClassOptions

Properties:
Name Type Attributes Description
userProject string <optional>

The ID of the project which will be billed for the request.

SetFileMetadataCallback(errnullable, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

apiResponse object

The full API response.

SetFileMetadataOptions

Configuration options for File#setMetadata().

SetFileMetadataResponse

Properties:
Name Type Description
0 object

The full API response.

SetHmacKeyMetadata

Subset of HmacKeyMetadata to update.

Properties:
Name Type Attributes Description
state string

New state of the HmacKey. Either 'ACTIVE' or 'INACTIVE'.

etag string <optional>

Include an etag from a previous get HMAC key request to perform safe read-modify-write.

SetHmacKeyMetadataOptions

Properties:
Name Type Attributes Description
userProject string <optional>

This parameter is currently ignored.

SetLabelsCallback(errnullable, metadata)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

metadata object

The bucket metadata.

SetLabelsOptions

Configuration options for Bucket#setLabels().

Properties:
Name Type Attributes Description
userProject string <optional>

The ID of the project which will be billed for the request.

SetLabelsResponse

Properties:
Name Type Description
0 object

The bucket metadata.

SetStorageClassCallback(errnullable, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

apiResponse object

The full API response.

SetStorageClassOptions

Configuration options for File#setStorageClass().

Properties:
Name Type Attributes Description
userProject string <optional>

The ID of the project which will be billed for the request.

SetStorageClassResponse

Properties:
Name Type Description
0 object

The full API response.

SignedPostPolicyV4Output

Properties:
Name Type Description
url string

The request URL.

fields object

The form fields to include in the POST request.

StopCallback(errnullable, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

apiResponse object

The full API response.

StopResponse

Properties:
Name Type Description
0 object

The full API response.

StorageOptions

Properties:
Name Type Attributes Default Description
projectId string <optional>

The project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. We will also check the environment variable GCLOUD_PROJECT for your project ID. If your app is running in an environment which supports Application Default Credentials, your project ID will be detected automatically.

keyFilename string <optional>

Full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option above is not necessary. NOTE: .pem and .p12 require you to specify the email option as well.

email string <optional>

Account email address. Required when using a .pem or .p12 keyFilename.

credentials object <optional>

Credentials object.

Properties
Name Type Attributes Description
client_email string <optional>
private_key string <optional>
retryOptions object <optional>

Options for customizing retries. Retriable server errors will be retried with exponential delay between them dictated by the formula max(maxRetryDelay, retryDelayMultiplier*retryNumber) until maxRetries or totalTimeout has been reached. Retries will only happen if autoRetry is set to true.

Properties
Name Type Attributes Default Description
autoRetry boolean <optional>
true

Automatically retry requests if the response is related to rate limits or certain intermittent server errors. We will exponentially backoff subsequent requests by default.

retryDelayMultiplier number <optional>
2

the multiplier by which to increase the delay time between the completion of failed requests, and the initiation of the subsequent retrying request.

totalTimeout number <optional>
600

The total time, starting from when the initial request is sent, after which an error will be returned, regardless of the retrying attempts made meanwhile.

maxRetryDelay number <optional>
64

The maximum delay time between requests. When this value is reached, retryDelayMultiplier will no longer be used to increase delay time.

maxRetries number <optional>
3

Maximum number of automatic retries attempted before returning the error.

retryableErrorFn function <optional>

Function that returns true if a given error should be retried and false otherwise.

idempotencyStrategy enum <optional>
IdempotencyStrategy.RetryConditional

Enumeration controls how conditionally idempotent operations are retried. Possible values are: RetryAlways - will respect other retry settings and attempt to retry conditionally idempotent operations. RetryConditional - will retry conditionally idempotent operations if the correct preconditions are set. RetryNever - never retry a conditionally idempotent operation.

userAgent string <optional>

The value to be prepended to the User-Agent header in API requests.

authClient object <optional>

AuthClient or GoogleAuth client to reuse instead of creating a new one.

timeout number <optional>

The amount of time in milliseconds to wait per http request before timing out.

interceptors_ Array.<object> <optional>

Array of custom request interceptors to be returned in the order they were assigned.

apiEndpoint string <optional>
storage.google.com

The API endpoint of the service used to make requests.

useAuthWithCustomEndpoint boolean <optional>
false

Controls whether or not to use authentication when using a custom endpoint.

callback Crc32cGeneratorCallback <optional>

A function that generates a CRC32C Validator. Defaults to CRC32C

UpdateAclCallback(errnullable, acl, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

acl object

The updated Acl Objects.

apiResponse object

The full API response.

UpdateAclResponse

Properties:
Name Type Description
0 object

The updated Acl Objects.

1 object

The full API response.

UploadCallback(errnullable, file, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

file object

The uploaded File.

apiResponse object

The full API response.

UploadManyFilesOptions

Properties:
Name Type Attributes Description
concurrencyLimit number <optional>

The number of concurrently executing promises to use when uploading the files.

skipIfExists boolean <optional>

Do not upload the file if it already exists in the bucket. This will set the precondition ifGenerationMatch = 0.

prefix string <optional>

A prefix to append to all of the uploaded files.

passthroughOptions object <optional>

UploadOptions Options to be passed through to each individual upload operation.

UploadOptions

Configuration options for Bucket#upload().

Properties:
Name Type Attributes Default Description
destination string | File <optional>

The place to save your file. If given a string, the file will be uploaded to the bucket using the string as a filename. When given a File object, your local file will be uploaded to the File object's bucket and under the File object's name. Lastly, when this argument is omitted, the file is uploaded to your bucket using the name of the local file.

encryptionKey string <optional>

A custom encryption key. See Customer-supplied Encryption Keys.

gzip boolean <optional>

Automatically gzip the file. This will set options.metadata.contentEncoding to gzip.

kmsKeyName string <optional>

The name of the Cloud KMS key that will be used to encrypt the object. Must be in the format: projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key.

metadata object <optional>

See an Objects: insert request body.

offset string <optional>

The starting byte of the upload stream, for resuming an interrupted upload. Defaults to 0.

predefinedAcl string <optional>

Apply a predefined set of access controls to this object.

Acceptable values are:

  • authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access.

  • bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access.

  • bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access.

  • private - Object owner gets OWNER access.

  • projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles.

  • publicRead - Object owner gets OWNER access, and allUsers get READER access.

private boolean <optional>

Make the uploaded file private. (Alias for options.predefinedAcl = 'private')

public boolean <optional>

Make the uploaded file public. (Alias for options.predefinedAcl = 'publicRead')

resumable boolean <optional>
true

Resumable uploads are automatically enabled and must be shut off explicitly by setting to false.

timeout number <optional>
60000

Set the HTTP request timeout in milliseconds. This option is not available for resumable uploads. Default: 60000

uri string <optional>

The URI for an already-created resumable upload. See File#createResumableUpload.

userProject string <optional>

The ID of the project which will be billed for the request.

validation string | boolean <optional>

Possible values: "md5", "crc32c", or false. By default, data integrity is validated with an MD5 checksum for maximum reliability. CRC32c will provide better performance with less reliability. You may also choose to skip validation completely, however this is not recommended.

UploadResponse

Properties:
Name Type Description
0 object

The uploaded File.

1 object

The full API response.