Sha256: bf4ee9c731fb23020e63a17607e1f50f51d7cbae0e341fb403721687be438802
Contents?: true
Size: 616 Bytes
Versions: 12
Compression:
Stored size: 616 Bytes
Contents
# https://imperavi.com/article/ uploadActiveStorage = (editor, data) -> for file in data.files upload = new ActiveStorage.DirectUpload(file, '/rails/active_storage/direct_uploads') upload.create (error, blob) => url = '/rails/active_storage/blobs/redirect/' + blob.signed_id + '/' + blob.filename editor.complete({ file: { url: url }}, data.e) (this.EffectiveBootstrap || {}).effective_article_editor = ($element, options) -> if options['active_storage'] options['image'] = { upload: (editor, data) -> uploadActiveStorage(editor, data) } ArticleEditor($element, options)
Version data entries
12 entries across 12 versions & 1 rubygems