botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Bot unable to receive attached files in Teams (Windows)

Open andrewchungxam opened this issue 7 years ago • 8 comments

Attaching file (in my case, for a barcode scan) does not work. Other conversations work, but the Dialog does not recognize or do anything with image (works fine in emulator).

Image is uploaded via (Paperclip -> Upload from computer -> Pick Image).

This is a One-on-One Bot.

There was a similar issue reported for v3 of the Bot Framework (https://github.com/Microsoft/BotBuilder/issues/4282).

Thank you!

andrewchungxam avatar Jan 29 '19 16:01 andrewchungxam

@dmvtech, have you found anything yet?

CoHealer avatar Feb 13 '19 21:02 CoHealer

Have been working with @andrewchungxam outside this thread. I have made some progress, but a few hurdles to work over.

dmvtech avatar Feb 13 '19 22:02 dmvtech

hi @andrewchungxam.

I attempted to reproduce with your code, but was hitting issues getting it up and running in Azure. Once done, you can debug the bot using the Teams channel using Ngrok. See more info here (though some of this blog article are a little outdated): https://blog.botframework.com/2017/10/19/debug-channel-locally-using-ngrok/

You can attempt to debug on your bot you have running and connected to Teams. Make sure that you also have your appId and appPassword specified for the "development" endpoint, otherwise you make get 403.

I can continue to investigate on my end.

dmvtech avatar Feb 16 '19 06:02 dmvtech

Hi dmvtech - it should be okay to publish (as a check though) -- does the project name have any spaces (I deleted any numbers and space from the beginning of published project name)? Also, does the BOT file have the "production" endpoint with the appropriate AppId and ProjectID filled out from the Azure portal? With the above, it should publish fine.

andrewchungxam avatar Feb 19 '19 12:02 andrewchungxam

@andrewchungxam, dmvtech is out for this week but he will reach out to you first thing on Monday.

CoHealer avatar Feb 19 '19 17:02 CoHealer

Still working on this one. Working to get his bot running in Azure so that I can debug.

dmvtech avatar Feb 28 '19 00:02 dmvtech

Able to get Andrew up and running with Ngrok debugging. Also, changed one important line in code to get download url with auth token.

var remoteFileUrl = ((JObject)file.Content)["downloadUrl"].ToString();

instead of

var remoteFileUrl = file.ContentUrl;

dmvtech avatar Mar 06 '19 18:03 dmvtech

Great work @dmvtech, thank you!

CoHealer avatar Mar 06 '19 18:03 CoHealer