feat: Activestorage direct upload (#3768)
This commit is contained in:
parent
cd6c9a8fe9
commit
69eaf3ff7f
9 changed files with 84 additions and 14 deletions
|
@ -14,12 +14,12 @@ export const buildCreatePayload = ({
|
|||
let payload;
|
||||
if (files && files.length !== 0) {
|
||||
payload = new FormData();
|
||||
files.forEach(file => {
|
||||
payload.append('attachments[]', file, file.name);
|
||||
});
|
||||
if (message) {
|
||||
payload.append('content', message);
|
||||
}
|
||||
files.forEach(file => {
|
||||
payload.append('attachments[]', file);
|
||||
});
|
||||
payload.append('private', isPrivate);
|
||||
payload.append('echo_id', echoId);
|
||||
payload.append('cc_emails', ccEmails);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue