fix(core.gbapp): #195 bind call to provide min context for uploads.
This commit is contained in:
parent
c5290b91aa
commit
b12a462e3e
1 changed files with 2 additions and 2 deletions
|
@ -1063,7 +1063,7 @@ export class GBMinService {
|
||||||
const url = attachment.contentUrl;
|
const url = attachment.contentUrl;
|
||||||
// https://github.com/GeneralBots/BotServer/issues/195 - '${botId}','uploads');
|
// https://github.com/GeneralBots/BotServer/issues/195 - '${botId}','uploads');
|
||||||
const localFolder = Path.join('work');
|
const localFolder = Path.join('work');
|
||||||
const localFileName = Path.join(localFolder, attachment.name);
|
const localFileName = Path.join(localFolder, this['botId'],'uploads', attachment.name);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let response;
|
let response;
|
||||||
|
@ -1156,7 +1156,7 @@ export class GBMinService {
|
||||||
if (process.env.ENABLE_DOWNLOAD) {
|
if (process.env.ENABLE_DOWNLOAD) {
|
||||||
// Prepare Promises to download each attachment and then execute each Promise.
|
// Prepare Promises to download each attachment and then execute each Promise.
|
||||||
|
|
||||||
const promises = step.context.activity.attachments.map(GBMinService.downloadAttachmentAndWrite);
|
const promises = step.context.activity.attachments.map(GBMinService.downloadAttachmentAndWrite.bind(min));
|
||||||
const successfulSaves = await Promise.all(promises);
|
const successfulSaves = await Promise.all(promises);
|
||||||
async function replyForReceivedAttachments(localAttachmentData) {
|
async function replyForReceivedAttachments(localAttachmentData) {
|
||||||
if (localAttachmentData) {
|
if (localAttachmentData) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue