mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 13:00:56 +03:00
Feature/Add ability to upload image url when calling API (#2683)
add ability to upload image url when calling API
This commit is contained in:
@@ -94,6 +94,12 @@ export const utilBuildChatflow = async (req: Request, socketIO?: Server, isInter
|
||||
fileUploads[i] = omit(upload, ['data'])
|
||||
}
|
||||
|
||||
if (upload.type === 'url' && upload.data) {
|
||||
const filename = upload.name
|
||||
const urlData = upload.data
|
||||
fileUploads[i] = { data: urlData, name: filename, type: 'url', mime: upload.mime ?? 'image/png' }
|
||||
}
|
||||
|
||||
// Run Speech to Text conversion
|
||||
if (upload.mime === 'audio/webm' || upload.mime === 'audio/mp4' || upload.mime === 'audio/ogg') {
|
||||
logger.debug(`Attempting a speech to text conversion...`)
|
||||
|
||||
Reference in New Issue
Block a user