feat: Support multiple file upload on dashboard (#3748)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
This commit is contained in:
parent
b304f5a826
commit
8cff690640
4 changed files with 22 additions and 9 deletions
|
@ -72,6 +72,7 @@
|
|||
:is-format-mode="showRichContentEditor"
|
||||
:enable-rich-editor="isRichEditorEnabled"
|
||||
:enter-to-send-enabled="enterToSendEnabled"
|
||||
:enable-multiple-file-upload="enableMultipleFileUpload"
|
||||
@toggleEnterToSend="toggleEnterToSend"
|
||||
/>
|
||||
</div>
|
||||
|
@ -283,6 +284,9 @@ export default {
|
|||
showReplyHead() {
|
||||
return !this.isOnPrivateNote && this.isAnEmailChannel;
|
||||
},
|
||||
enableMultipleFileUpload() {
|
||||
return this.isAnEmailChannel || this.isAWebWidgetInbox || this.isAPIInbox;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
currentChat(conversation) {
|
||||
|
@ -469,7 +473,6 @@ export default {
|
|||
);
|
||||
},
|
||||
getMessagePayload(message) {
|
||||
const [attachment] = this.attachedFiles;
|
||||
const messagePayload = {
|
||||
conversationId: this.currentChat.id,
|
||||
message,
|
||||
|
@ -480,8 +483,11 @@ export default {
|
|||
messagePayload.contentAttributes = { in_reply_to: this.inReplyTo };
|
||||
}
|
||||
|
||||
if (attachment) {
|
||||
messagePayload.file = attachment.resource.file;
|
||||
if (this.attachedFiles && this.attachedFiles.length) {
|
||||
messagePayload.files = [];
|
||||
this.attachedFiles.forEach(attachment => {
|
||||
messagePayload.files.push(attachment.resource.file);
|
||||
});
|
||||
}
|
||||
|
||||
if (this.ccEmails) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue