v12 icon indicating copy to clipboard operation
v12 copied to clipboard

[BUG]: Node transition failing after file upload

Open Michael-N-M opened this issue 4 years ago • 5 comments

Description After a user uploads a file using choice skill, the chatbot does not transition to the next node. When testing this in the studio interface using the emulator, the studio UI goes blank after file upload.

To Reproduce Steps to reproduce the behavior:

  1. Create a choice skill which returns either BOTPRESS.FILE_UPLOAD or BOTPRESS.IMAGE_UPLOAD
  2. Link it to some nodes
  3. Chat with the bot and upload a file
  4. No transition after file upload

Expected behavior A clear and concise description of what you expected to happen.

Screenshots image

Environment (please complete the following information):

  • OS: Windows]
  • Browser [e.g. Chrome, Safari]
  • Browser Version [e.g. 83.0.4103.97]
  • Botpress Version [e.g. 12.10.0]
  • NodeJS [e.g. 12.13]

Additional context Conversation with the chatbot e.g., thanking a user should continue after file upload

Michael-N-M avatar Jun 29 '21 23:06 Michael-N-M

@Michael-N-M For me this is working properly. Look at this screenshot for reference: Screenshot from 2021-11-01 11-59-33

tomkcey avatar Nov 01 '21 16:11 tomkcey

@Michael-N-M For me this is working properly. Look at this screenshot for reference: Screenshot from 2021-11-01 11-59-33

How to use the uploaded image in conversation?

I want to send the image to server using API.

codeilm avatar Jun 21 '22 09:06 codeilm

@codeilm Did you get this?

How to use the uploaded image in conversation?

I want to send the image to server using API.

Johna5821 avatar May 12 '23 07:05 Johna5821

@Johna5821 I have same requirement

How to use the uploaded image in conversation?

I want to send the image to server using API.

vamsi2449 avatar Sep 19 '23 10:09 vamsi2449

@vamsi2449 @Johna5821 your uploaded file is located in event.payload.url, so you can use it to send it via formData for example:

  let data = new FormData()
  data.append('proof_image', fs.createReadStream(event.payload.url))
  let config = {
    method: 'post',
    maxBodyLength: Infinity,
    url: '<url>',
    headers: {
      ...data.getHeaders()
    },
    data: data
  }
  const resp = (await axios.request(config)).data

Aram-Osipyan avatar Apr 05 '24 12:04 Aram-Osipyan