Class Upload (4.0.2)
Stay organized with collections
Save and categorize content based on your preferences.
Inheritance
Pumpify
>
Upload
Package
gcs-resumable-upload
Constructors
(constructor)(cfg)
constructor(cfg: UploadConfig);
Constructs a new instance of the Upload
class
Parameter
Properties
apiEndpoint
authClient
authClient: {
request: <T>(opts: GaxiosOptions) => Promise<GaxiosResponse<T>> | GaxiosPromise<T>;
};
authConfig
authConfig?: {
scopes?: string[];
};
baseURI
bucket
cacheKey
chunkSize
configStore
configStore: ConfigStore;
contentLength
contentLength: number | '*';
customRequestOptions
customRequestOptions: GaxiosOptions;
encryption
file
generation
key
kmsKeyName
maxRetryDelay
maxRetryTotalTimeout
maxRetryTotalTimeout: number;
metadata: ConfigMetadata;
numBytesWritten
numRetries
offset
origin
params
predefinedAcl
predefinedAcl?: PredefinedAcl;
private
public
retryableErrorFn
retryableErrorFn?: (err: ApiError) => boolean;
retryDelayMultiplier
retryDelayMultiplier: number;
retryLimit
timeOfFirstRequest
timeOfFirstRequest: number;
uri
uriProvidedManually
uriProvidedManually: boolean;
userProject
Methods
createURI()
createURI(): Promise<string>;
Returns
Type | Description |
Promise<string> | |
createURI(callback)
createURI(callback: CreateUriCallback): void;
Parameter
Returns
createURIAsync()
protected createURIAsync(): Promise<string>;
Returns
Type | Description |
Promise<string> | |
deleteConfig()
Returns
isServerErrorResponse(status)
isServerErrorResponse(status: number): boolean;
Check if a given status code is 5xx
Parameter
Name | Description |
status |
number
The status code to check
|
Returns
Type | Description |
boolean | if the status is 5xx
|
isSuccessfulResponse(status)
isSuccessfulResponse(status: number): boolean;
Check if a given status code is 2xx
Parameter
Name | Description |
status |
number
The status code to check
|
Returns
Type | Description |
boolean | if the status is 2xx
|
startUploading()
startUploading(): Promise<void>;
Returns
Type | Description |
Promise<void> | |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-03-16 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]