From b79bf62196f1032d4a6f95799ced79cbbadad856 Mon Sep 17 00:00:00 2001 From: Javan Makhmali Date: Mon, 12 Feb 2018 18:21:49 -0500 Subject: Add sgid support --- app/javascript/activetext/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/javascript') diff --git a/app/javascript/activetext/index.js b/app/javascript/activetext/index.js index 03cb9960cb..cdcd1d311f 100644 --- a/app/javascript/activetext/index.js +++ b/app/javascript/activetext/index.js @@ -25,9 +25,10 @@ addEventListener("trix-attachment-add", event => { console.warn("Failed to store file for attachment", attachment, error) } else { console.log("Created blob for attachment", attributes, attachment) - const { signed_id } = attributes - const url = `${blobsURL}/${signed_id}/${encodeURIComponent(attachment.file.name)}` - attachment.setAttributes({ url, signed_id }) + attachment.setAttributes({ + url: `${blobsURL}/${attributes.signed_id}/${encodeURIComponent(attachment.file.name)}`, + sgid: attributes.attachable_sgid + }) } }) }) -- cgit v1.2.3