botbuilder-get-attachment
Helper library for attachments retrieval. Supports attachments sent thru Skype, Chatbot Emulator and shell.
Library provides a function with next interface:
getAttament(session, attachmentId) - returns a Promise. Function arguments:
- session - Microsoft Bot Framework Session object
- attachmentId - index of attachment
Returned promise will be resolved with object, that will have next attributes:
- name - (String|Buffer) Filename
- contentUrl - optional (String|Buffer) URL to download attachment
- content - (String|Buffer) Attachment body
Example
const builder = ;const restify = ; let getAttachment = ;let connector = appId: '' appPassword: ''; let bot = connector; bot
Changelog
- 0.3 - String Buffer returned
- 0.2 - Simplified interfaces
- 0.1 - First version of the library