It was really useful, but I've noticed one thing. There is no CSRF protection for file uploads and deletes. This could be really dangerous and I think that it should be fixed.
Btw. commenting is painful. I had to sign up, confirm my email, etc. I had to take a lot of different steps in order to write this comment. It would be great if you could simplify this process.
Hi! Thanks for making this tutorial.
I am using Trix on a form that submits a POST request to a Word Press endpoint that creates a draft of a post (user submitted content). However, when I upload an image using Trix, in the WP dashboard, I get a broken link and no image.
I think this is because Trix is submitting the image as an image tag wrapped around with an anchor tag with an href to the image however, the href is using a relative path which would explain the broken link.
```
colorful_helmet.png165.18 KB
```
Is there a way to extract the image url if I am using active storage and s3 to store the images?
Is there a tutorial on setting up Trix image uploads with Heroku? I've got Trix setup on local and pushed to Heroku and noticed that each time I pushed new code to heroku, the image links were all broken. Then after reading into this more, I realized this also happens when the Heroku dyno is restarted. I am currently not sure what to do with Rails 6, Active Storage and S3 (or a different one).
☒ That would be expected behavior as the dyno is like a docker container without any persistent volume claims. You should offload any uploads which needs to persist between restarts or deploys to a service like AWS S3 or Backblaze B2.
My config - Rails 6 + sprockets. - Active storage OK - Trix editor ok with <%= f.rich_text_area :content %> - Trix editor KO with <%= f.trix_editor :content %>
Can someone tel me why I can't use f.trix_editor ??
Hey, nice screencast!
It was really useful, but I've noticed one thing. There is no CSRF protection for file uploads and deletes. This could be really dangerous and I think that it should be fixed.
Btw. commenting is painful. I had to sign up, confirm my email, etc. I had to take a lot of different steps in order to write this comment. It would be great if you could simplify this process.
To add CSRF:
Could it be integrated with the aws-s3 gem
Is there a tutorial on setting up Trix image uploads with Heroku? I've got Trix setup on local and pushed to Heroku and noticed that each time I pushed new code to heroku, the image links were all broken. Then after reading into this more, I realized this also happens when the Heroku dyno is restarted. I am currently not sure what to do with Rails 6, Active Storage and S3 (or a different one).
Thanks,
Nav
My config
- Rails 6 + sprockets.
- Active storage OK
- Trix editor ok with <%= f.rich_text_area :content %>
- Trix editor KO with <%= f.trix_editor :content %>
Can someone tel me why I can't use f.trix_editor ??