mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 21:00:58 +03:00
Bugfix/Overrideconfig for form data body (#3932)
fix overrideconfig for form data body
This commit is contained in:
@@ -238,7 +238,7 @@ export const executeFlow = async ({
|
|||||||
signal
|
signal
|
||||||
}: IExecuteFlowParams) => {
|
}: IExecuteFlowParams) => {
|
||||||
const question = incomingInput.question
|
const question = incomingInput.question
|
||||||
const overrideConfig = incomingInput.overrideConfig ?? {}
|
let overrideConfig = incomingInput.overrideConfig ?? {}
|
||||||
const uploads = incomingInput.uploads
|
const uploads = incomingInput.uploads
|
||||||
const prependMessages = incomingInput.history ?? []
|
const prependMessages = incomingInput.history ?? []
|
||||||
const streaming = incomingInput.streaming
|
const streaming = incomingInput.streaming
|
||||||
@@ -316,7 +316,7 @@ export const executeFlow = async ({
|
|||||||
|
|
||||||
// Process form data body with files
|
// Process form data body with files
|
||||||
if (files?.length) {
|
if (files?.length) {
|
||||||
const overrideConfig: ICommonObject = { ...incomingInput }
|
overrideConfig = { ...incomingInput }
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
const fileNames: string[] = []
|
const fileNames: string[] = []
|
||||||
const fileBuffer = await getFileFromUpload(file.path ?? file.key)
|
const fileBuffer = await getFileFromUpload(file.path ?? file.key)
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import { Request } from 'express'
|
|||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
import { cloneDeep, omit } from 'lodash'
|
import { cloneDeep, omit } from 'lodash'
|
||||||
import {
|
import {
|
||||||
ICommonObject,
|
|
||||||
IMessage,
|
IMessage,
|
||||||
addArrayFilesToStorage,
|
addArrayFilesToStorage,
|
||||||
mapMimeTypeToInputField,
|
mapMimeTypeToInputField,
|
||||||
@@ -47,7 +46,7 @@ export const executeUpsert = async ({
|
|||||||
files
|
files
|
||||||
}: IExecuteFlowParams) => {
|
}: IExecuteFlowParams) => {
|
||||||
const question = incomingInput.question
|
const question = incomingInput.question
|
||||||
const overrideConfig = incomingInput.overrideConfig ?? {}
|
let overrideConfig = incomingInput.overrideConfig ?? {}
|
||||||
let stopNodeId = incomingInput?.stopNodeId ?? ''
|
let stopNodeId = incomingInput?.stopNodeId ?? ''
|
||||||
const chatHistory: IMessage[] = []
|
const chatHistory: IMessage[] = []
|
||||||
const isUpsert = true
|
const isUpsert = true
|
||||||
@@ -55,7 +54,7 @@ export const executeUpsert = async ({
|
|||||||
const apiMessageId = uuidv4()
|
const apiMessageId = uuidv4()
|
||||||
|
|
||||||
if (files?.length) {
|
if (files?.length) {
|
||||||
const overrideConfig: ICommonObject = { ...incomingInput }
|
overrideConfig = { ...incomingInput }
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
const fileNames: string[] = []
|
const fileNames: string[] = []
|
||||||
const fileBuffer = await getFileFromUpload(file.path ?? file.key)
|
const fileBuffer = await getFileFromUpload(file.path ?? file.key)
|
||||||
|
|||||||
Reference in New Issue
Block a user