In addition to your text contents, Dialogue Wise also allows you to add media files, like images and documents. In order to upload the media files, you need to create a payload of type UploadMediaRequest and set all the necessary parameters as below.
var request = new UploadMediaRequest();
request.apiKey = '[Your API Key]';
request.emailHash='[The hash of your email]';
Then, you just need to set the localFilePath property which is the path to the file on your device.
request.localFilePath = '[Path to the file on your device]';
Then all you need to do is to call the uploadMedia method using this payload.
var dialogueWiseService = new DialogueWiseService();
var response = await dialogueWiseService.uploadMedia(request);
That’s it! You will now get a response of type DialogueWiseResponse which will contain the URL to the uploaded file.
Below are the list of file types that are allowed.
Type | Allowed file types |
---|---|
Images | .gif, .jpeg, .jpg, .png, .svg |
Documents | .pdf, .txt, .doc, .docx |
Videos | .mp4, .mov |
Please note, file of size more than 10 MB are not allowed.