Skip to content
scalive
Menu
ConnectingLiveReconnectingOffline
GitHub
c

LiveUpload

class LiveUpload[Result]

Immutable runtime snapshot of an allowed upload and its current entries.

The upload runtime owns the live state; this value is a point-in-time view intended for models and rendering. Keep the snapshot returned by each upload operation or refresh it through the upload context after progress events.

Type parameters

Result

the result produced by each completed destination entry

Parameters

definition

the reusable definition with which this upload was allowed

ref

the transient reference used by the browser upload protocol

entries

entry snapshots in their current browser selection order

errors

upload-wide errors; entry-specific failures are available from errors

Exported from scalive.upload.LiveUpload. View source (scalive/api/src/scalive/upload/LiveUpload.scala:337-368)

Methods9

accept

def accept: LiveUploadAccept

Returns the accepted file policy from definition.

Exported from scalive.upload.LiveUpload.accept. View source (scalive/api/src/scalive/upload/LiveUpload.scala:346-346)

autoUpload

def autoUpload: Boolean

Returns whether the browser starts valid entries automatically.

Exported from scalive.upload.LiveUpload.autoUpload. View source (scalive/api/src/scalive/upload/LiveUpload.scala:364-364)

chunkSize

def chunkSize: Int

Returns the requested client chunk size from definition.

Exported from scalive.upload.LiveUpload.chunkSize. View source (scalive/api/src/scalive/upload/LiveUpload.scala:358-358)

chunkTimeout

def chunkTimeout: zio.package.Duration

Returns the client chunk timeout from definition.

Exported from scalive.upload.LiveUpload.chunkTimeout. View source (scalive/api/src/scalive/upload/LiveUpload.scala:361-361)

external

def external: Boolean

Returns whether bytes are sent directly from the browser to an external destination.

Exported from scalive.upload.LiveUpload.external. View source (scalive/api/src/scalive/upload/LiveUpload.scala:367-367)

maxEntries

def maxEntries: Int

Returns the configured accepted-entry limit from definition.

Exported from scalive.upload.LiveUpload.maxEntries. View source (scalive/api/src/scalive/upload/LiveUpload.scala:349-349)

maxEntriesMode

def maxEntriesMode: LiveUploadMaxEntriesMode

Returns how consumed entries affect the configured limit.

Exported from scalive.upload.LiveUpload.maxEntriesMode. View source (scalive/api/src/scalive/upload/LiveUpload.scala:352-352)

maxFileSize

def maxFileSize: Long

Returns the per-entry byte limit from definition.

Exported from scalive.upload.LiveUpload.maxFileSize. View source (scalive/api/src/scalive/upload/LiveUpload.scala:355-355)

name

def name: String

Returns the public upload name from definition.

Exported from scalive.upload.LiveUpload.name. View source (scalive/api/src/scalive/upload/LiveUpload.scala:343-343)

Values4

definition

val definition: LiveUploadDef[Result]

The reusable definition with which this upload was allowed.

Exported from scalive.upload.LiveUpload.definition. View source (scalive/api/src/scalive/upload/LiveUpload.scala:338-338)

entries

val entries: List[LiveUploadEntry[Result]]

Entry snapshots in their current browser selection order.

Exported from scalive.upload.LiveUpload.entries. View source (scalive/api/src/scalive/upload/LiveUpload.scala:340-340)

errors

val errors: List[LiveUploadError]

Upload-wide errors; entry-specific failures are available from errors.

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

ref

val ref: UploadRef

The transient reference used by the browser upload protocol.

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