mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 23:01:09 +03:00
Bugfix/Address file name with special chars (#3496)
address file name with special chars
This commit is contained in:
@@ -702,7 +702,6 @@ export const ChatMessage = ({ open, chatflowid, isAgentCanvas, isDialog, preview
|
||||
|
||||
if (fullFileUpload) {
|
||||
const filesWithFullUploadType = uploadedFiles.filter((file) => file.type === 'file:full')
|
||||
|
||||
if (filesWithFullUploadType.length > 0) {
|
||||
const formData = new FormData()
|
||||
for (const file of filesWithFullUploadType) {
|
||||
@@ -712,12 +711,14 @@ export const ChatMessage = ({ open, chatflowid, isAgentCanvas, isDialog, preview
|
||||
|
||||
const response = await attachmentsApi.createAttachment(chatflowid, chatId, formData)
|
||||
const data = response.data
|
||||
|
||||
for (const extractedFileData of data) {
|
||||
const content = extractedFileData.content
|
||||
const fileName = extractedFileData.name
|
||||
|
||||
// find matching name in previews and replace data with content
|
||||
const uploadIndex = uploads.findIndex((upload) => upload.name === fileName)
|
||||
|
||||
if (uploadIndex !== -1) {
|
||||
uploads[uploadIndex] = {
|
||||
...uploads[uploadIndex],
|
||||
|
||||
Reference in New Issue
Block a user