Package
gcs-resumable-uploadProperties
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.
authClient
authClient?: {
request: <T>(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.
authConfig
authConfig?: GoogleAuthOptions;
The GoogleAuthOptions passed to google-auth-library
bucket
bucket: string;
The name of the destination bucket.
chunkSize
chunkSize?: number;
Create a separate request per chunk.
Should be a multiple of 256 KiB (2^18). We recommend using at least 8 MiB for the chunk size.
https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload
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.
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.
file
file: string;
The name of the destination file.
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.
key
key?: string | Buffer;
A customer-supplied encryption key. See https://cloud.google.com/storage/docs/encryption#customer-supplied.
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.
metadata
metadata?: ConfigMetadata;
Any metadata you wish to set on the object.
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.
origin
origin?: string;
Set an Origin header when creating the resumable upload URI.
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
predefinedAcl
predefinedAcl?: PredefinedAcl;
Apply a predefined set of access controls to the created file.
private
private?: boolean;
Make the uploaded file private. (Alias for config.predefinedAcl = 'private')
public
public?: boolean;
Make the uploaded file public. (Alias for config.predefinedAcl = 'publicRead')
retryOptions
retryOptions?: RetryOptions;
Configuration options for retrying retryable errors.
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.
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.