aboutsummaryrefslogblamecommitdiffstats
path: root/actiontext/app/javascript/actiontext/index.js
blob: 0e9251018ae16db52006f96ce4bddada062cbbe1 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                      
 
                                                  
                                      
 


                                                           
   
  
import { AttachmentUpload } from "./attachment_upload"

addEventListener("trix-attachment-add", event => {
  const { attachment, target } = event

  if (attachment.file) {
    const upload = new AttachmentUpload(attachment, target)
    upload.start()
  }
})