Multi-service direct uploads in Action Text attachment uploads

This commit is contained in:
Gannon McGibbon 2021-11-15 14:00:00 -05:00
parent 27f17b98d6
commit 0b69ad4de6

@ -4,7 +4,7 @@ export class AttachmentUpload {
constructor(attachment, element) {
this.attachment = attachment
this.element = element
this.directUpload = new DirectUpload(attachment.file, this.directUploadUrl, this)
this.directUpload = new DirectUpload(attachment.file, this.directUploadUrl, this.directUploadToken, this.attachmentName, this)
}
start() {
@ -42,4 +42,11 @@ export class AttachmentUpload {
get blobUrlTemplate() {
return this.element.dataset.blobUrlTemplate
}
get directUploadToken() {
return this.element.getAttribute("data-direct-upload-token");
}
get attachmentName() {
return this.element.getAttribute("data-direct-upload-attachment-name");
}
}