diff options
author | Javan Makhmali <javan@javan.us> | 2018-02-12 18:21:49 -0500 |
---|---|---|
committer | Javan Makhmali <javan@javan.us> | 2018-02-12 18:21:49 -0500 |
commit | b79bf62196f1032d4a6f95799ced79cbbadad856 (patch) | |
tree | 0d737a4c8429b5272916122db9dd03e302ce5a50 /app/javascript | |
parent | 986d6a6da4a42a9e92e8c0cc96b7edca35e778de (diff) | |
download | rails-b79bf62196f1032d4a6f95799ced79cbbadad856.tar.gz rails-b79bf62196f1032d4a6f95799ced79cbbadad856.tar.bz2 rails-b79bf62196f1032d4a6f95799ced79cbbadad856.zip |
Add sgid support
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/activetext/index.js | 7 |
1 files changed, 4 insertions, 3 deletions
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 + }) } }) }) |