fix: Correct MIME type for JPG images for Gemini 2.0 Pro
This commit is contained in:
parent
a4c0224ab5
commit
bdf85c68d1
@ -254,7 +254,8 @@ class FileStorage {
|
||||
const filePath = path.join(this.storageDir, id)
|
||||
const data = await fs.promises.readFile(filePath)
|
||||
const base64 = data.toString('base64')
|
||||
const mime = `image/${path.extname(filePath).slice(1)}`
|
||||
const ext = path.extname(filePath).slice(1) == 'jpg' ? 'jpeg' : path.extname(filePath).slice(1)
|
||||
const mime = `image/${ext}`
|
||||
return {
|
||||
mime,
|
||||
base64,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user