How to upload an image or file from within the chatbot
In this document, you will learn to upload an image or file within the chatbot.
Instructions
An image or a file can be uploaded from the chatbot using the “Storage“ node
The Storage Node could be found in the below path.
Navigate to your project > Develop > Experience Designer
In the Experience Designer Left Pane, “Storage Node” could be found under the “Orbita“ section
By default, the Storage Node would be in “Read“ Action. To upload a file or image, the action should be changed to “Write“.
To change the Action, open the “Storage Node“ and choose “Write“ in the Action dropdown.
The Input for the Storage Node would be
msg.filename = 'yourfilename'
msg.payload = '{string} or Buffer [Data]'
The output of the Storage Node would be
msg.file : {
filename: "test.csv"
data: "Buffer [Data]"
}
Example:
We have designed the below example to give input to the Storage Node.
Code inside the “Form file payload“:
To change the configuration of the “Storage“node, please get in touch with your Customer Success representative.