Skip to content

Commit

Permalink
fix(core.gbapp): #195 bind call to provide min context for uploads.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Jan 31, 2023
1 parent c5290b9 commit b2f2c73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core.gbapp/services/GBMinService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ export class GBMinService {
const url = attachment.contentUrl;
// https://github.com/GeneralBots/BotServer/issues/195 - '${botId}','uploads');
const localFolder = Path.join('work');
const localFileName = Path.join(localFolder, attachment.name);
const localFileName = Path.join(localFolder, this['botId'],'uploads', attachment.name);

try {
let response;
Expand Down Expand Up @@ -1156,7 +1156,7 @@ export class GBMinService {
if (process.env.ENABLE_DOWNLOAD) {
// 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);
async function replyForReceivedAttachments(localAttachmentData) {
if (localAttachmentData) {
Expand Down

0 comments on commit b2f2c73

Please sign in to comment.