Passa al contenuto principale

Class: ImageReader

Reads the content of an image file into a Document object (which stores the image file as a Blob).

Extends

Constructors

new ImageReader()

new ImageReader(): ImageReader

Returns

ImageReader

Inherited from

FileReader . constructor

Methods

loadData()

loadData(filePath): Promise <Document <Metadata>[]>

Parameters

filePath: string

Returns

Promise <Document <Metadata>[]>

Inherited from

FileReader . loadData

Source

packages/core/src/readers/type.ts:17


loadDataAsContent()

loadDataAsContent(fileContent): Promise <Document <Metadata>[]>

Public method for this reader. Required by BaseReader interface.

Parameters

fileContent: Buffer

Returns

Promise <Document <Metadata>[]>

Promise<Document[]> A Promise object, eventually yielding zero or one ImageDocument of the specified file.

Overrides

FileReader . loadDataAsContent

Source

packages/core/src/readers/ImageReader.ts:16


addMetaData()

static addMetaData(filePath): (doc, index) => void

Parameters

filePath: string

Returns

Function

Parameters

doc: Document <Metadata>

index: number

Returns

void

Inherited from

FileReader . addMetaData

Source

packages/core/src/readers/type.ts:24