Summary: Methods | Inherited Methods | [Expand All]
public class

# UploadTask.TaskSnapshot

extends Object
implements StorageTask.ProvideError

java.lang.Object
↳ | com.google.firebase.storage.UploadTask.TaskSnapshot

## Class Overview

Encapsulates state about the running `UploadTask`

## Summary

Public Methods
long | getBytesTransferred()
Uri | getDownloadUrl() Returns a long lived download URL with a revokable token.
Exception | getError()
StorageMetadata | getMetadata()
StorageReference | getStorage()
StorageTask<TResult extends StorageTask.ProvideError> | getTask()
long | getTotalByteCount()
Uri | getUploadSessionUri()

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
final void | wait()
From interface com.google.firebase.storage.StorageTask.ProvideError
abstract Exception | getError()

## Public Methods

#### public long getBytesTransferred ()

##### Returns

- the total bytes uploaded so far.

#### public Uri getDownloadUrl ()

Returns a long lived download URL with a revokable token. This can be used to share the file with others, but can be revoked by a developer in the Firebase Console if desired.

##### Returns

- The `Uri` representing the download URL. You can feed this url into a `URL` and download the object via `openStream()`.

#### public Exception getError ()

##### Returns

- the last error encountered.

#### public StorageMetadata getMetadata ()

##### Returns

- the metadata for the object. After uploading, this will return the resulting final Metadata which will include the upload URL.

#### public StorageReference getStorage ()

##### Returns

- the target of the upload.

#### public StorageTask<TResult extends StorageTask.ProvideError> getTask ()

##### Returns

- the `StorageTask` for this state.

#### public long getTotalByteCount ()

##### Returns

- the total bytes to upload..

#### public Uri getUploadSessionUri ()

##### Returns

- the session Uri, valid for approximately one week, which can be used to resume an upload later by passing this value into `putFile(Uri, StorageMetadata, Uri)`