🐛 Fix ky not working due to fetch rewriting by mistral package
Closes #1396
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { createAction, option } from '@typebot.io/forge'
|
||||
import { toBuffer as generateQrCodeBuffer } from 'qrcode'
|
||||
import { uploadFileToBucket } from '@typebot.io/lib/s3/uploadFileToBucket'
|
||||
import { createId } from '@typebot.io/lib/createId'
|
||||
|
||||
@@ -29,6 +28,8 @@ export const generateQrCode = createAction({
|
||||
'QR code image URL is not specified. Please select a variable to save the generated QR code image.'
|
||||
)
|
||||
|
||||
const generateQrCodeBuffer = (await import('qrcode')).toBuffer
|
||||
|
||||
const url = await uploadFileToBucket({
|
||||
file: await generateQrCodeBuffer(options.data),
|
||||
key: `tmp/qrcodes/${createId() + createId()}.png`,
|
||||
|
||||
Reference in New Issue
Block a user