Skip to content
scalive
Menu
ConnectingLiveReconnectingOffline
GitHub
c

LiveUploadEntry

class LiveUploadEntry[Result]

Immutable runtime snapshot of one selected upload entry.

A snapshot can become stale as browser events advance the upload. Obtain the latest LiveUpload from the upload context or use the value returned by an upload operation.

Type parameters

Result

the result produced by the configured upload destination

Parameters

ref

the entry's transient protocol identifier

client

untrusted metadata reported by the browser

status

the entry's status when this snapshot was created

metadata

destination metadata, when available; for hosted uploads this is produced by the writer after completion, while for external uploads it is the client-visible preflight configuration

Exported from scalive.upload.LiveUploadEntry. View source (scalive/api/src/scalive/upload/LiveUpload.scala:297-318)

Methods2

errors

def errors: List[LiveUploadError]

Returns the entry errors when status is Invalid, or an empty list otherwise.

Exported from scalive.upload.LiveUploadEntry.errors. View source (scalive/api/src/scalive/upload/LiveUpload.scala:316-318)

progress

def progress: Int

Returns the display progress for this snapshot.

Uploading entries return their reported percentage, completed entries return 100, and all other statuses return 0.

Exported from scalive.upload.LiveUploadEntry.progress. View source (scalive/api/src/scalive/upload/LiveUpload.scala:308-311)

Values4

client

val client: UploadClientMetadata

Untrusted metadata reported by the browser.

Exported from scalive.upload.LiveUploadEntry.client. View source (scalive/api/src/scalive/upload/LiveUpload.scala:299-299)

metadata

val metadata: Option[zio.json.ast.Json.Obj]

Destination metadata, when available; for hosted uploads this is produced by the writer after completion, while for external uploads it is the client-visible preflight configuration.

Exported from scalive.upload.LiveUploadEntry.metadata. View source (scalive/api/src/scalive/upload/LiveUpload.scala:301-301)

ref

val ref: UploadEntryRef

The entry's transient protocol identifier.

Exported from scalive.upload.LiveUploadEntry.ref. View source (scalive/api/src/scalive/upload/LiveUpload.scala:298-298)

status

val status: LiveUploadEntryStatus

The entry's status when this snapshot was created.

Exported from scalive.upload.LiveUploadEntry.status. View source (scalive/api/src/scalive/upload/LiveUpload.scala:300-300)