From 05fd0ea54e4af8e606dd0ad63b998f201d9a98a4 Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Fri, 29 Sep 2023 16:15:43 -0300 Subject: [PATCH] fix(core.gbapp): #372 fix. --- packages/basic.gblib/services/DialogKeywords.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/basic.gblib/services/DialogKeywords.ts b/packages/basic.gblib/services/DialogKeywords.ts index e95b5d08..042d44cc 100644 --- a/packages/basic.gblib/services/DialogKeywords.ts +++ b/packages/basic.gblib/services/DialogKeywords.ts @@ -1246,12 +1246,12 @@ export class DialogKeywords { } if (!url) { - const imageData = await (await fetch(url)).arrayBuffer(); + const ext = mime.extension(Path.extname(filename.localName)); - + // Prepare a cache to be referenced by Bot Framework. - - let buf: any = Buffer.from(imageData); + + const buf = Fs.readFileSync(filename); const gbaiName = DialogKeywords.getGBAIPath(min.botId); const localName = Path.join('work', gbaiName, 'cache', `tmp${GBAdminService.getRndReadableIdentifier()}.${ext}`); Fs.writeFileSync(localName, buf, { encoding: null });