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
readonlyallowedPathRoots: readonlystring[] =[]
maxBytes
readonlymaxBytes:number
root
readonlyroot:string
Methods
delete()
delete(
handle):Promise<void>
Parameters
handle
string
Returns
Promise<void>
read()
read(
source):Promise<Uint8Array<ArrayBufferLike>>
Parameters
source
Returns
Promise<Uint8Array<ArrayBufferLike>>
reference()
reference(
id,staged,createdAt?):MemoryRecordAttachment
Parameters
id
string
staged
createdAt?
string = ...
Returns
stage()
stage(
bytes,mime):Promise<StagedAttachment>
Parameters
bytes
Uint8Array
mime
string
Returns
Promise<StagedAttachment>