Skip to content
scalive
Menu
ConnectingLiveReconnectingOffline
GitHub
o

LiveUploadDestination

object LiveUploadDestination

Constructors for upload destinations.

Exported from scalive.upload.LiveUploadDestination. View source (scalive/api/src/scalive/upload/LiveUpload.scala:684-733)

Methods3

external

def external[Result](uploader: LiveUploadExternalUploader[Result]): LiveUploadDestination[Result]

Creates a direct-to-external-service destination backed by uploader.

Scalive performs preflight and tracks the server-side result, but the browser transfers bytes directly and reports completion.

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

hosted

def hosted[State, Result](writer: LiveUploadWriter[State, Result]): LiveUploadDestination[Result]

Creates a server-hosted destination backed by writer.

The browser sends chunks to Scalive, which drives the writer lifecycle and retains its result until application code consumes it or framework cleanup discards it.

Exported from scalive.upload.LiveUploadDestination.hosted. View source (scalive/api/src/scalive/upload/LiveUpload.scala:708-711)

inMemory

def inMemory: LiveUploadDestination[zio.Chunk[Byte]]

Buffers every uploaded byte in server heap memory and returns it as one Chunk[Byte].

Bytes remain reachable until the entry is consumed or cleaned up, and chunk accumulation may require additional intermediate allocations. Use this destination only for small, strictly bounded uploads and modest concurrency. Prefer a streaming hosted writer or external uploader for large or attacker-controlled workloads.

Exported from scalive.upload.LiveUploadDestination.inMemory. View source (scalive/api/src/scalive/upload/LiveUpload.scala:692-701)