Interface UploadConfig (3.3.1)

Package

gcs-resumable-upload!

Properties

apiEndpoint

apiEndpoint?: string;

The API endpoint used for the request. Defaults to storage.googleapis.com. **Warning**: If this value does not match the pattern *.googleapis.com, an emulator context will be assumed and authentication will be bypassed.

Property Value
TypeDescription
string

authClient

authClient?: {
        request: <T = any>(opts: GaxiosOptions) => Promise<GaxiosResponse<T>> | GaxiosPromise<T>;
    };

If you want to re-use an auth client from google-auto-auth, pass an instance here. Defaults to GoogleAuth and gets automatically overridden if an emulator context is detected.

Property Value
TypeDescription
{ request: <T = any>(opts: GaxiosOptions) => Promise<GaxiosResponse<T>> | GaxiosPromise<T>; }

authConfig

authConfig?: GoogleAuthOptions;

The GoogleAuthOptions passed to google-auth-library

Property Value
TypeDescription
GoogleAuthOptions

bucket

bucket: string;

The name of the destination bucket.

Property Value
TypeDescription
string

configPath

configPath?: string;

Where the gcs-resumable-upload configuration file should be stored on your system. This maps to the configstore option by the same name.

Property Value
TypeDescription
string

customRequestOptions

customRequestOptions?: GaxiosOptions;

For each API request we send, you may specify custom request options that we'll add onto the request. The request options follow the gaxios API: https://github.com/googleapis/gaxios#request-options.

Property Value
TypeDescription
GaxiosOptions

file

file: string;

The name of the destination file.

Property Value
TypeDescription
string

generation

generation?: number;

This will cause the upload to fail if the current generation of the remote object does not match the one provided here.

Property Value
TypeDescription
number

key

key?: string | Buffer;

A customer-supplied encryption key. See https://cloud.google.com/storage/docs/encryption#customer-supplied.

Property Value
TypeDescription
string | Buffer

kmsKeyName

kmsKeyName?: string;

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

Property Value
TypeDescription
string

metadata

metadata?: ConfigMetadata;

Any metadata you wish to set on the object.

Property Value
TypeDescription
ConfigMetadata

offset

offset?: number;

The starting byte of the upload stream, for resuming an interrupted upload. See https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload#resume-upload.

Property Value
TypeDescription
number

origin

origin?: string;

Set an Origin header when creating the resumable upload URI.

Property Value
TypeDescription
string

params

params?: QueryParameters;

Specify query parameters that go along with the initial upload request. See https://cloud.google.com/storage/docs/json_api/v1/objects/insert#parameters

Property Value
TypeDescription
QueryParameters

predefinedAcl

predefinedAcl?: PredefinedAcl;

Apply a predefined set of access controls to the created file.

Property Value
TypeDescription
PredefinedAcl

private

private?: boolean;

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

Property Value
TypeDescription
boolean

public

public?: boolean;

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

Property Value
TypeDescription
boolean

retryOptions

retryOptions?: RetryOptions;

Configuration options for retrying retriable errors.

Property Value
TypeDescription
RetryOptions

uri

uri?: string;

If you already have a resumable URI from a previously-created resumable upload, just pass it in here and we'll use that.

Property Value
TypeDescription
string

userProject

userProject?: string;

If the bucket being accessed has requesterPays functionality enabled, this can be set to control which project is billed for the access of this file.

Property Value
TypeDescription
string