UploadTaskSnapshot interface
Stay organized with collections
Save and categorize content based on your preferences.
Holds data about the current state of the upload task.
Signature:
export interface UploadTaskSnapshot
Properties
Property |
Type |
Description |
bytesTransferred |
number |
The number of bytes that have been successfully uploaded so far. |
metadata |
FullMetadata |
Before the upload completes, contains the metadata sent to the server. After the upload completes, contains the metadata sent back from the server. |
ref |
StorageReference |
The reference that spawned this snapshot's upload task. |
state |
TaskState |
The current state of the task. |
task |
UploadTask |
The task of which this is a snapshot. |
totalBytes |
number |
The total number of bytes to be uploaded. |
UploadTaskSnapshot.bytesTransferred
The number of bytes that have been successfully uploaded so far.
Signature:
bytesTransferred: number;
Before the upload completes, contains the metadata sent to the server. After the upload completes, contains the metadata sent back from the server.
Signature:
metadata: FullMetadata;
UploadTaskSnapshot.ref
The reference that spawned this snapshot's upload task.
Signature:
ref: StorageReference;
UploadTaskSnapshot.state
The current state of the task.
Signature:
state: TaskState;
UploadTaskSnapshot.task
The task of which this is a snapshot.
Signature:
task: UploadTask;
UploadTaskSnapshot.totalBytes
The total number of bytes to be uploaded.
Signature:
totalBytes: number;
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 2022-07-22 UTC.
[null,null,["Last updated 2022-07-22 UTC."],[],[],null,["# UploadTaskSnapshot interface\n\nHolds data about the current state of the upload task.\n\n**Signature:** \n\n export interface UploadTaskSnapshot \n\nProperties\n----------\n\n| Property | Type | Description |\n|----------------------------------------------------------------------------------------|------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|\n| [bytesTransferred](./storage.uploadtasksnapshot.md#uploadtasksnapshotbytestransferred) | number | The number of bytes that have been successfully uploaded so far. |\n| [metadata](./storage.uploadtasksnapshot.md#uploadtasksnapshotmetadata) | [FullMetadata](./storage.fullmetadata.md#fullmetadata_interface) | Before the upload completes, contains the metadata sent to the server. After the upload completes, contains the metadata sent back from the server. |\n| [ref](./storage.uploadtasksnapshot.md#uploadtasksnapshotref) | [StorageReference](./storage.storagereference.md#storagereference_interface) | The reference that spawned this snapshot's upload task. |\n| [state](./storage.uploadtasksnapshot.md#uploadtasksnapshotstate) | [TaskState](./storage.md#taskstate) | The current state of the task. |\n| [task](./storage.uploadtasksnapshot.md#uploadtasksnapshottask) | [UploadTask](./storage.uploadtask.md#uploadtask_interface) | The task of which this is a snapshot. |\n| [totalBytes](./storage.uploadtasksnapshot.md#uploadtasksnapshottotalbytes) | number | The total number of bytes to be uploaded. |\n\nUploadTaskSnapshot.bytesTransferred\n-----------------------------------\n\nThe number of bytes that have been successfully uploaded so far.\n\n**Signature:** \n\n bytesTransferred: number;\n\nUploadTaskSnapshot.metadata\n---------------------------\n\nBefore the upload completes, contains the metadata sent to the server. After the upload completes, contains the metadata sent back from the server.\n\n**Signature:** \n\n metadata: FullMetadata;\n\nUploadTaskSnapshot.ref\n----------------------\n\nThe reference that spawned this snapshot's upload task.\n\n**Signature:** \n\n ref: StorageReference;\n\nUploadTaskSnapshot.state\n------------------------\n\nThe current state of the task.\n\n**Signature:** \n\n state: TaskState;\n\nUploadTaskSnapshot.task\n-----------------------\n\nThe task of which this is a snapshot.\n\n**Signature:** \n\n task: UploadTask;\n\nUploadTaskSnapshot.totalBytes\n-----------------------------\n\nThe total number of bytes to be uploaded.\n\n**Signature:** \n\n totalBytes: number;"]]