public class

UploadTask.TaskSnapshot

extends SnapshotBase
java.lang.Object
   ↳ com.google.firebase.storage.StorageTask.SnapshotBase
     ↳ 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.
StorageMetadata getMetadata()
long getTotalByteCount()
Uri getUploadSessionUri()
[Expand]
Inherited Methods
From class com.google.firebase.storage.StorageTask.SnapshotBase
From class java.lang.Object
From interface com.google.firebase.storage.StorageTask.ProvideError

Public Methods

public long getBytesTransferred ()

Returns
long 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
Uri The Uri representing the download URL. You can feed this url into a URL and download the object via openStream().

public StorageMetadata getMetadata ()

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

public long getTotalByteCount ()

Returns
long the total bytes to upload..

public Uri getUploadSessionUri ()

Returns
Uri 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)