mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-22 09:01:09 +03:00
Unstructured Upsert bug (#2628)
* Unstructured Upsert bug When upserting with the API, the uploaded files are of type pdfFile, txtFile, etc. but the code reads only fileObject which is the uploaded file using the button * Update UnstructuredFile.ts fixed linting error --------- Co-authored-by: Mohamed Akram <makram@ntgclarity.com>
This commit is contained in:
@@ -448,7 +448,16 @@ class UnstructuredFile_DocumentLoaders implements INode {
|
||||
if (_omitMetadataKeys) {
|
||||
omitMetadataKeys = _omitMetadataKeys.split(',').map((key) => key.trim())
|
||||
}
|
||||
const fileBase64 = nodeData.inputs?.fileObject as string
|
||||
// give priority to upload with upsert then to fileObject (upload from UI component)
|
||||
const fileBase64 =
|
||||
nodeData.inputs?.pdfFile ||
|
||||
nodeData.inputs?.txtFile ||
|
||||
nodeData.inputs?.yamlFile ||
|
||||
nodeData.inputs?.docxFile ||
|
||||
nodeData.inputs?.jsonlinesFile ||
|
||||
nodeData.inputs?.csvFile ||
|
||||
nodeData.inputs?.jsonFile ||
|
||||
(nodeData.inputs?.fileObject as string)
|
||||
|
||||
const obj: UnstructuredLoaderOptions = {
|
||||
apiUrl: unstructuredAPIUrl,
|
||||
|
||||
Reference in New Issue
Block a user