Feature: Support file type messages on widget and dashboard (#659)
- Adds support for file upload Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com> Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
parent
0afa5c297f
commit
7fcd2d0e85
28 changed files with 338 additions and 69 deletions
|
@ -20,10 +20,9 @@ class MessageApi extends ApiClient {
|
|||
});
|
||||
}
|
||||
|
||||
sendAttachment([conversationId, { file, file_type }]) {
|
||||
sendAttachment([conversationId, { file }]) {
|
||||
const formData = new FormData();
|
||||
formData.append('attachment[file]', file);
|
||||
formData.append('attachment[file_type]', file_type);
|
||||
return axios({
|
||||
method: 'post',
|
||||
url: `${this.url}/${conversationId}/messages`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue