I’m pretty new to Phoenix, so bear with me here
I’m integrating the Trix editor (GitHub - basecamp/trix: A rich text editor for everyday writing) into a LiveView. I’ve got the text-editing features working, but now I’m working on file uploads, and I’m wondering if it is possible to use live uploads to make this work.
Storing Attached Files
Trix automatically accepts files dragged or pasted into an editor and inserts them as attachments in the document. Each attachment is considered pending until you store it remotely and provide Trix with a permanent URL.
To store attachments, listen for the
trix-attachment-addevent. Upload the attached files with XMLHttpRequest yourself and set the attachment’s URL attribute upon completion. See the attachment example for detailed information.