mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 07:00:49 +03:00
Feature/OpenAI Response API (#5014)
* - Added support for built-in OpenAI tools including web search, code interpreter, and image generation. - Enhanced file handling by extracting artifacts and file annotations from response metadata. - Implemented download functionality for file annotations in the UI. - Updated chat history management to include additional kwargs for artifacts, file annotations, and used tools. - Improved UI components to display used tools and file annotations effectively. * remove redundant currentContainerId * update comment
This commit is contained in:
@@ -16,6 +16,7 @@ const streamUploadedFile = async (req: Request, res: Response, next: NextFunctio
|
||||
const chatflowId = req.query.chatflowId as string
|
||||
const chatId = req.query.chatId as string
|
||||
const fileName = req.query.fileName as string
|
||||
const download = req.query.download === 'true' // Check if download parameter is set
|
||||
|
||||
const appServer = getRunningExpressApp()
|
||||
|
||||
@@ -35,7 +36,12 @@ const streamUploadedFile = async (req: Request, res: Response, next: NextFunctio
|
||||
}
|
||||
const orgId = workspace.organizationId as string
|
||||
|
||||
res.setHeader('Content-Disposition', contentDisposition(fileName))
|
||||
// Set Content-Disposition header - force attachment for download
|
||||
if (download) {
|
||||
res.setHeader('Content-Disposition', contentDisposition(fileName, { type: 'attachment' }))
|
||||
} else {
|
||||
res.setHeader('Content-Disposition', contentDisposition(fileName))
|
||||
}
|
||||
const fileStream = await streamStorageFile(chatflowId, chatId, fileName, orgId)
|
||||
|
||||
if (!fileStream) throw new InternalFlowiseError(StatusCodes.INTERNAL_SERVER_ERROR, `Error: streamStorageFile`)
|
||||
|
||||
Reference in New Issue
Block a user