UploadHandle
Defined in: libs/ccs-files-user-client/src/core/types.ts:940
One upload. T is the File for client.upload, TicketUploadResult for uploadFromTicket.
Type Parameters
Section titled “Type Parameters”T = File
Properties
Section titled “Properties”
readonlyid:string
Defined in: libs/ccs-files-user-client/src/core/types.ts:942
A local id (also the snapshot’s).
readonlyname:string
Defined in: libs/ccs-files-user-client/src/core/types.ts:943
readonlysize:number
Defined in: libs/ccs-files-user-client/src/core/types.ts:944
fileId
Section titled “fileId”
readonlyfileId:string|null
Defined in: libs/ccs-files-user-client/src/core/types.ts:946
Known once the ticket is issued.
uploadId
Section titled “uploadId”
readonlyuploadId:string|null
Defined in: libs/ccs-files-user-client/src/core/types.ts:947
readonlystate:UploadState
Defined in: libs/ccs-files-user-client/src/core/types.ts:948
progress
Section titled “progress”
readonlyprogress:UploadProgress
Defined in: libs/ccs-files-user-client/src/core/types.ts:949
readonlyerror:unknown
Defined in: libs/ccs-files-user-client/src/core/types.ts:951
The reason of the last failure, null otherwise.
readonlydone:Promise<T>
Defined in: libs/ccs-files-user-client/src/core/types.ts:956
Settles with the outcome: resolves on done, rejects on failed (the error) and cancelled
(UploadCancelledError). After resume() of a failed upload this is a new promise.
Methods
Section titled “Methods”pause()
Section titled “pause()”pause():
void
Defined in: libs/ccs-files-user-client/src/core/types.ts:958
Stops the PUTs in flight (their bytes are sent again on resume). No effect while completing.
Returns
Section titled “Returns”void
resume()
Section titled “resume()”resume():
void
Defined in: libs/ccs-files-user-client/src/core/types.ts:960
Continues a paused upload, or retries a failed one; parts the store acknowledged are kept.
Returns
Section titled “Returns”void
cancel()
Section titled “cancel()”cancel():
Promise<void>
Defined in: libs/ccs-files-user-client/src/core/types.ts:962
Stops for good and releases the ticket (client uploads); done rejects with UploadCancelledError.
Returns
Section titled “Returns”Promise<void>
on<
K>(event,handler):Unsubscribe
Defined in: libs/ccs-files-user-client/src/core/types.ts:963
Type Parameters
Section titled “Type Parameters”K extends keyof UploadEventMap
Parameters
Section titled “Parameters”K
handler
Section titled “handler”(value) => void
Returns
Section titled “Returns”serialize()
Section titled “serialize()”serialize():
UploadSnapshot
Defined in: libs/ccs-files-user-client/src/core/types.ts:967