Class: MemoryBinaryFile
Represent a file to store
Webda Schema
Extends
Constructors
new MemoryBinaryFile(buffer, info)
new MemoryBinaryFile(
buffer
,info
):MemoryBinaryFile
Parameters
• buffer: string
| Buffer
• info: Partial
<BinaryFileInfo
>= {}
Returns
Overrides
Source
packages/core/src/services/binary.ts:214
Properties
buffer
buffer:
Buffer
Content
Source
packages/core/src/services/binary.ts:212
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?:
any
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
get()
get():
Promise
<Readable
>
Returns
Promise
<Readable
>
Overrides
Source
packages/core/src/services/binary.ts:227
getHashes()
getHashes():
Promise
<Object
>
Create hashes
Returns
Promise
<Object
>
challenge
challenge:
string
hash
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
toBinaryFileInfo()
toBinaryFileInfo():
BinaryFileInfo
Retrieve a plain BinaryFileInfo object