Closed anujprasad-eaton closed 2 years ago
My Bot framework Composer version details:
Version: 2.1.1 Electron: 8.2.4 Chrome: 80.0.3987.165 NodeJS: 12.13.0 V8: 8.0.426.27-electron.0
Hey @anujprasad, is your intent to attach a file? It looks like your getting the error as the input from the card is a text rather than an attachment file. Run your bot and click on the upload file (paper clip icon) button on bottom left of the chat to attach a file. Please let me know if this helps.
@ramfattah Yes, my intent is to attach a pdf file. The input text "number" that you see in the screen shot is just a regular expression trigger to trigger the number dialog and the very first step on that dialog is to ask user for file attachment. It throws the error "Object reference not set to an instance of an object" even before prompting the user the message "Please upload your invoice". Ideally user should first see this prompt "Please upload your invoice" and then he/she would click on upload file (paper clip icon) button to attach a file, it should not throw the exception before that.
I have shared the composer authoring screen for "Prompt for a file and attachment" , do you find any anomaly in that implementation that could throw the exception - "Object reference not set to an instance of an object"?
Re-attaching the composer bot authoring screen:
I'm facing the same issue.
In my case the input prompt did not have any text, this is why it errored. Ui should reflect it being necessary or should be possible to not contain any value.
I figured out the root cause and solution, incase anyone facing similar issue: Exact steps to reproduce the issue:
The root cause for the issue was contentType which is marked as mandatory field with red *, now even if I remove the text "application/pdf" from contentType field I continue to get the error message - "Object reference not set to an instance of an object". So the fix is to remove the control "prompt for file or an attachment" first and then re-add it and make sure you have not added any text in the mandatory field - "contentType " :).
Quick question - Once the file is uploaded by user using the prompt "File or attachment input", does that file stays in the server forever or it's stored in memory within dialog scope? If I have to hand it off to any live agent such as customer helpdesk, what's the best possible way to store the transcript and this file and then send it over an email to the live agent?
Hi @anujprasad , Microsoft Bot Framework is an open platform that allows developers to integrate with a variety of agent engagement platforms. This is the official Microsoft Documentation on Handoff integration models to provide a common language and best practices for bot developers and system integrators building conversational AI systems with human in the loop.
Also, Here is the Bot Framework v4 Handoff Library.
Hi @anujprasad , Microsoft Bot Framework is an open platform that allows developers to integrate with a variety of agent engagement platforms. This is the official Microsoft Documentation on Handoff integration models to provide a common language and best practices for bot developers and system integrators building conversational AI systems with human in the loop.
Also, Here is the Bot Framework v4 Handoff Library.
can i get upload file url so i can store some where in api and the through api i will dowload it
if user send me pdf attachment in bot composer. How I will store that pdf in my code. How it will convert to base 64 or in URL to send via API to store somewhere
if user send me pdf attachment in bot composer. How I will store that pdf in my code. How it will convert to base 64 or in URL to send via API to store somewhere
My issue is resolved and it uploading in my blob storage and getting URL too. NOTE : Storing locally only
When I try to run through server its show error Below Error : An attempt was made to access a socket in a way forbidden by its access permissions. An attempt was made to access a socket in a way forbidden by its access permissions.
how to used validation for file ie. file should be in .pdf format only in bot composer
if user send me pdf attachment in bot composer. How I will store that pdf in my code. How it will convert to base 64 or in URL to send via API to store somewhere
My issue is resolved and it uploading in my blob storage and getting the URL too. NOTE : Storing locally only
When I try to run through server its show error Below Error : An attempt was made to access a socket in a way forbidden by its access permissions. An attempt was made to access a socket in a way forbidden by its access permissions.
Hi Hadkar, Can you please explain the process you followed so that whatever the user uploads, you get the URL in blob storage? Right now, after the user uploads any pdf i get ContentURL which is having localhost link. After copy-pasting that localhost link to any website its downloading the file without the extension. Can you also say how did you solve this? Any help is much appreciated.
See in my case I get the whole name i.e - filename.pdf etc In your case exactly what link are you getting? and my issue is still pending
How to store this file to azure blob storage or sharepoint list ?
I'm also searching the possibility of saving attachments to azure storage. My bot as channel is using Teams. What I done up to now - I used "prompt for a file or attachment" and get content url of the file. Im looking for the next steps. From web I found that file should be sent via http request to azure blob. Is it a proper way, should I use this content url? Is it possible to done form Bot Framework Composer or extra coding is necessary? I appreciate all advices.
I am trying to create an attachment input action in bot framework composer and followed these steps but I am getting the error message - "Object reference not set to an instance of an object" on emulator vesrion 4.14.0. Please find below the screen shot of the implementation and error message: