LocalBinaryFile
Class: LocalBinaryFile
Defined in: packages/core/src/services/binary.service.ts:227
BinaryFile backed by a local filesystem path
Extends
Constructors
Constructor
new LocalBinaryFile(
filePath):LocalBinaryFile
Defined in: packages/core/src/services/binary.service.ts:236
Create a new LocalBinaryFile
Parameters
filePath
string
path to the local file
Returns
LocalBinaryFile
Overrides
Properties
challenge?
optionalchallenge?:string
Defined in: packages/core/src/services/binary.service.ts:143
Proof of possession of the content: hash of the content prefixed by 'WEBDA', computed by the client of the challenge and by the service on upload. Never persisted on a model nor sent to clients: it is not part of the schema of a binary attribute
Schema Ignore
Inherited from
hash?
optionalhash?:string
Defined in: packages/core/src/services/binary.service.ts:149
Will be computed by the service
hash of the content
Inherited from
metadata?
optionalmetadata?:object
Defined in: packages/core/src/services/binary.service.ts:153
Metadatas stored along with the binary
Inherited from
mimetype
mimetype:
string
Defined in: packages/core/src/services/binary.service.ts:136
Mimetype of the binary
Inherited from
name
name:
string
Defined in: packages/core/src/services/binary.service.ts:124
Current name
Inherited from
originalname?
optionaloriginalname?:string
Defined in: packages/core/src/services/binary.service.ts:128
Original name
Inherited from
path
path:
string
Defined in: packages/core/src/services/binary.service.ts:231
Path on the hard drive
size
size:
number
Defined in: packages/core/src/services/binary.service.ts:132
Size of the binary
Inherited from
Methods
get()
get():
Promise<Readable>
Defined in: packages/core/src/services/binary.service.ts:248
Returns
Promise<Readable>
Overrides
getHashes()
getHashes():
Promise<{challenge:string;hash:string; }>
Defined in: packages/core/src/services/binary.service.ts:198
Create hashes
Returns
Promise<{ challenge: string; hash: string; }>
the result
Inherited from
set()
set(
info):void
Defined in: packages/core/src/services/binary.service.ts:166
Set the information
Parameters
info
BinaryFileInfo<{ }>
the information object
Returns
void
Inherited from
toBinaryFileInfo()
toBinaryFileInfo():
BinaryFileInfo<{ }>
Defined in: packages/core/src/services/binary.service.ts:179
Retrieve a plain BinaryFileInfo object
Returns
BinaryFileInfo<{ }>
the result