In addition to your text contents, Dialogue Wise also allows you to add media files, like images and documents. 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 dialogueWiseClient = new DialogueWiseClient(); var response = await dialogueWiseClient.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|
Please note, file of size more than 10 MB are not allowed.