Closed AshrafHefny closed 2 years ago
so, there is no error (i.e. catch block is not executing) or there is empty error?
@aleksandrsivanovs thanks for your response. no there is no errors at all
Hello I am sending file with FormData() and it is working in my own demo.
FileUpload(files: FileList) { const formData = new FormData(); formData.append('file', files.item(0)); this.file = files.item(0); // Get active channel sid const channelSid = this.activeChannel.sid; if (channelSid) { this.chatClient.getChannelBySid(channelSid).then( channel => { // send media with all FormData parsed atrtibutes channel.sendMessage(formData).then(msg => { console.log('Media message', msg); this.loading = false; }); }, error => {
}
);
}
}
hope, it is working for you. lets me know if any problem on thats.
I am trying to post media using
sendMessage
function but it's not workingThis coe reutrns no errors, but I can't send the image?!