Skip to content
scalive
Menu
ConnectingLiveReconnectingOffline
GitHub
c

UploadClientMetadata

class UploadClientMetadata

Browser-reported metadata for a selected upload entry.

Every field in this value is untrusted client input. In particular, fileName and relativePath are not safe file-system paths, mediaType does not prove the content type, and sizeBytes does not prove how many bytes an external destination received. Sanitize names, choose server-generated storage paths, and inspect or otherwise verify uploaded content before using it.

Parameters

fileName

the file name reported by the browser

relativePath

the browser-reported relative path, when directory selection supplies one

sizeBytes

the browser-reported size in bytes

mediaType

the browser-reported media type

lastModifiedMillis

the browser-reported last-modified time in Unix epoch milliseconds

metadata

additional browser-provided JSON metadata

Exported from scalive.upload.UploadClientMetadata. View source (scalive/api/src/scalive/upload/LiveUpload.scala:238-244)

Values6

fileName

val fileName: String

The file name reported by the browser.

Exported from scalive.upload.UploadClientMetadata.fileName. View source (scalive/api/src/scalive/upload/LiveUpload.scala:239-239)

lastModifiedMillis

val lastModifiedMillis: Option[Long]

The browser-reported last-modified time in Unix epoch milliseconds.

Exported from scalive.upload.UploadClientMetadata.lastModifiedMillis. View source (scalive/api/src/scalive/upload/LiveUpload.scala:243-243)

mediaType

val mediaType: String

The browser-reported media type.

Exported from scalive.upload.UploadClientMetadata.mediaType. View source (scalive/api/src/scalive/upload/LiveUpload.scala:242-242)

metadata

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

Additional browser-provided JSON metadata.

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

relativePath

val relativePath: Option[String]

The browser-reported relative path, when directory selection supplies one.

Exported from scalive.upload.UploadClientMetadata.relativePath. View source (scalive/api/src/scalive/upload/LiveUpload.scala:240-240)

sizeBytes

val sizeBytes: Long

The browser-reported size in bytes.

Exported from scalive.upload.UploadClientMetadata.sizeBytes. View source (scalive/api/src/scalive/upload/LiveUpload.scala:241-241)