How do I upload an attachment to the server when I attach it in the trix-editor
abrhambas01 opened this issue · comments
That's how the trix-editor does it right ? I have to upload an attachment to the server once the attachment is attached in the editor ? it should have it like this righ t?
imageAttached(file){
console.log("image attached",file);
Hi @abrhambas01. What kind of attachment would you like to attach? There are props available to handle image uploads for you. If you have another kind of attachment the process is a little different.
image attachments particularly
@michaeljoyner
If you are attaching an image, you can do it as per the instructions in this section of the readme, where you pass in the endpoint you would like the image to be uploaded to, and then the component will upload it for you.
If you are building out your own UI for the image upload, as described here, you would do the upload yourself however you chose, then pass the final html you would like as the attachment to the attachment method described in the readme section linked above.
I hope that is helpful, if not, let me know. Thanks.