Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unstructured Upsert bug #2628

Merged
merged 3 commits into from
Jun 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading