Skip to content

apollo-code


apollo-code / storage/src / AttachmentStore

Class: AttachmentStore

Constructors

Constructor

new AttachmentStore(root, maxBytes?, allowedPathRoots?): AttachmentStore

Parameters

root

string

maxBytes?

number = ...

allowedPathRoots?

readonly string[] = []

Returns

AttachmentStore

Properties

allowedPathRoots

readonly allowedPathRoots: readonly string[] = []


maxBytes

readonly maxBytes: number


root

readonly root: string

Methods

delete()

delete(handle): Promise<void>

Parameters

handle

string

Returns

Promise<void>


read()

read(source): Promise<Uint8Array<ArrayBufferLike>>

Parameters

source

AttachmentRef

Returns

Promise<Uint8Array<ArrayBufferLike>>


reference()

reference(id, staged, createdAt?): MemoryRecordAttachment

Parameters

id

string

staged

StagedAttachment

createdAt?

string = ...

Returns

MemoryRecordAttachment


stage()

stage(bytes, mime): Promise<StagedAttachment>

Parameters

bytes

Uint8Array

mime

string

Returns

Promise<StagedAttachment>