fix file convert to base64
This commit is contained in:
parent
c0883fc2bc
commit
350d452a7b
@ -387,7 +387,7 @@ const analyzeImage = async (fileId, token) => {
|
|||||||
|
|
||||||
const convertFileToBase64 = (file) => {
|
const convertFileToBase64 = (file) => {
|
||||||
const base64Image = file.buffer.toString('base64')
|
const base64Image = file.buffer.toString('base64')
|
||||||
return base64Image
|
return `data:${file.mimetype};base64,${base64Image}`
|
||||||
}
|
}
|
||||||
|
|
||||||
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = "0"
|
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = "0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user