chore: Delayed deploy of direct uploads (#3966)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Tejaswini Chile
2022-02-15 16:16:54 +05:30
committed by GitHub
parent 2591a04c0b
commit 94a473c9f8
12 changed files with 90 additions and 40 deletions

View File

@@ -41,7 +41,12 @@ const sendAttachment = ({ attachment }) => {
const { file } = attachment;
const formData = new FormData();
formData.append('message[attachments][]', file);
if (typeof file === 'string') {
formData.append('message[attachments][]', file);
} else {
formData.append('message[attachments][]', file, file.name);
}
formData.append('message[referer_url]', referrerURL);
formData.append('message[timestamp]', timestamp);
return {