BinaryMap
Class: BinaryMap<T>
This is a map used to retrieve binary
BinaryMap
Extends
BinaryFile<T>
Type parameters
• T = any
Constructors
new BinaryMap(service, obj)
new BinaryMap<
T>(service,obj):BinaryMap<T>
Parameters
• service: BinaryService<BinaryParameters, BinaryEvents>
• obj: BinaryFileInfo
Returns
BinaryMap<T>
Overrides
Source
packages/core/src/services/binary.ts:254
Properties
__ctx
__ctx:
OperationContext<any,any>
Current context
Source
packages/core/src/services/binary.ts:247
__store
__store:
BinaryService<BinaryParameters,BinaryEvents>
Link to the binary store
Source
packages/core/src/services/binary.ts:252
challenge?
challenge?:
string
Will be computed by the service
hash of the content prefixed by 'WEBDA'
Inherited from
Source
packages/core/src/services/binary.ts:106
hash?
hash?:
string
Will be computed by the service
hash of the content
Inherited from
Source
packages/core/src/services/binary.ts:112
metadata?
metadata?:
T
Metadatas stored along with the binary
Inherited from
Source
packages/core/src/services/binary.ts:116
mimetype
mimetype:
string
Mimetype of the binary
Inherited from
Source
packages/core/src/services/binary.ts:100
name
name:
string
Current name
Inherited from
Source
packages/core/src/services/binary.ts:88
originalname?
originalname?:
string
Original name
Inherited from
Source
packages/core/src/services/binary.ts:92
size
size:
number
Size of the binary
Inherited from
Source
packages/core/src/services/binary.ts:96
Methods
downloadTo()
downloadTo(
filename):Promise<void>
Download the binary to a path
Shortcut to call Binary.downloadTo with current object
Parameters
• filename: string
Returns
Promise<void>
Source
packages/core/src/services/binary.ts:283
get()
get():
Promise<Readable>
Get the binary data
Returns
Promise<Readable>
Overrides
Source
packages/core/src/services/binary.ts:265
getAsBuffer()
getAsBuffer():
Promise<Buffer>
Get into a buffer
Returns
Promise<Buffer>
Source
packages/core/src/services/binary.ts:272
getHashes()
getHashes():
Promise<Object>
Create hashes
Returns
Promise<Object>
challenge
challenge:
stringhash
hash:
string
Inherited from
Source
packages/core/src/services/binary.ts:157
set()
set(
info):void
Set the information
Parameters
• info: BinaryFileInfo
Returns
void
Inherited from
Source
packages/core/src/services/binary.ts:126
setContext()
setContext(
ctx):void
Set the http context
Parameters
• ctx: OperationContext<any, any>
Returns
void
Source
packages/core/src/services/binary.ts:291
toBinaryFileInfo()
toBinaryFileInfo():
BinaryFileInfo
Retrieve a plain BinaryFileInfo object