fix(basic.gblib): SEND FILE TO extension adjusted according to file type.

This commit is contained in:
Rodrigo Rodriguez 2023-12-19 16:52:23 -03:00
parent 00d78efa30
commit d1cb8b4f01

View file

@ -1276,8 +1276,9 @@ export class DialogKeywords {
let path = '/' + urlJoin(gbaiName, `${min.botId}.gbdrive`);
const sys = new SystemKeywords();
let template = await sys.internalGetDocument(client, baseUrl, path, filename);
let url = template['@microsoft.graph.downloadUrl'];
const res = await fetch(url);
const driveUrl = template['@microsoft.graph.downloadUrl'];
const res = await fetch(driveUrl);
let buf: any = Buffer.from(await res.arrayBuffer());
let localName1 = Path.join('work', gbaiName, 'cache', `tmp${GBAdminService.getRndReadableIdentifier()}.${ext}`);
Fs.writeFileSync(localName1, buf, { encoding: null });