Editor.js Image Uploads with Active Storage | Ruby on Rails 7 Tutorial Part 2

  Рет қаралды 3,423

Deanin

Deanin

Күн бұрын

Пікірлер: 16
@Deanin
@Deanin Жыл бұрын
This includes Drag & Drop as well as copy and paste image uploads to your Editor.JS instances. Took a bit longer because I had to handle some edge cases, so sorry this one was late! Get caught up with the playlist: kzbin.info/aero/PL3mtAHT_eRexIV5-61ibrzBKap1TT2Q_y
@tuhei-zu3qx
@tuhei-zu3qx 2 ай бұрын
ありがとうございます! あなたのおかげで仕事が進みそうです!!
@luci-lazy
@luci-lazy Жыл бұрын
Your tutorials are the best. Please keep it going. Thanks you so much.
@ivanrubalcava7109
@ivanrubalcava7109 Жыл бұрын
Thanks for these great tutorials I was able to implement these things on my own project!
@nyaorobenjamin
@nyaorobenjamin Жыл бұрын
Hey Dean, great job and effort on this. Maybe part 3 you can do nested attributes with Editor js. That would be super cool as well.
@collimarco
@collimarco Жыл бұрын
Thanks, really useful
@WardVuillemot
@WardVuillemot 8 ай бұрын
I believe there is a scaling problem with delete_unassociated_images whereby 2+ pages being edited or created with new images will end up in a race condition. Whatever page updates first will delete the images of the other page's new (yet to be associated) images, correct? Resolution is likely an ActiveJob that deletes unassociated images after ~24 hours. Sorry if you covered this in passing during the video. Am I wrong? As always, very useful reference videos for implementation and learning. Thank you!
@evansensteen7000
@evansensteen7000 4 ай бұрын
what about video upload ?
@wintanmi
@wintanmi Жыл бұрын
Hy Deannin, thanks so much for the last video on the quiz app, but just a tiny request, can you please have an episode that adds a timer to the questions and something like a leaderboard also, I would be so glad if you can grant this wish amongst my many wishes.
@atstockland
@atstockland 7 ай бұрын
Thanks Deanin. I'm converting the JSON hash in to a Prawn PDF---similar to how you parsed it in the helper. The issue I'm running in to the using the saved url in the PDF document. Prawns image method can't read that url. Neither can StringIO.open or open-url open(). Pasting that url in to the browser opens the image, however the url is converted from the active storage url to the actual url location on amazon. I'm curious if you have any ideas on how to gain access to the actual image once inside the PDF document and render it inside Prawns image() method? Thanks!
@azizdevfull
@azizdevfull Жыл бұрын
Thanks!
@wakematta
@wakematta Жыл бұрын
What if the rails blob url generates a url that is only accesible for a few hours. How to you refresh the url?
@Deanin
@Deanin Жыл бұрын
Oh God I forgot about the temporary URLs. I'm really not sure how to handle that off the top of my head. I personally don't use anything except for permanent URLs, but lemme think about it and maybe I'll come up with something.
@matiasbg8747
@matiasbg8747 Жыл бұрын
hello!! Very nice tutorial, thk. I have the following problem in this method... -> no implicit conversion of nil into String def parse_content # Article model has a content:json column JSON.parse(content) end Sorry for the bother, but I can't fix it...🙌
@atstockland
@atstockland 7 ай бұрын
That means your content is nil. Simply start the parse_content method with "return unless content.present?" JSON is trying to parse nothing...and throwing an error.
@krzysztofkeczkowski9666
@krzysztofkeczkowski9666 11 ай бұрын
For those who use PostgreSQL, I'm providing a solution to the problem, which looked like this in the console: Image Tool: uploading failed because of incorrect response: {"success":0,"error":"PG::NotNullViolation: ERROR: null value in column \"article_id\" of relation \"article_images\" violates not-null constraint DETAIL: Failing row contains (1, null, 2024-01-21 11:53:01.763403, 2024-01-21 11:53:01.763403). "} To solve this error in the migration create_article_images.rb, you need to change the parameter null value from false to true class CreateArticleImages < ActiveRecord::Migration[7.1] def change create_table :article_images do |t| t.belongs_to :article, null: true, foreign_key: true t.timestamps end end end Of course, before making the change, you need to perform a db:rollback, and after the change, do a db:migrate ;)
Turbo Frame Pages in Ruby on Rails 7
15:47
Deanin
Рет қаралды 9 М.
Editor.js in Ruby on Rails 7 with Stimulus!
23:48
Deanin
Рет қаралды 6 М.
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН
The border property you never knew you needed
14:25
Kevin Powell
Рет қаралды 100 М.
Let's Build a Dockerfile for Your Rails Apps From Scratch
1:06:58
Turbo Frame Modals (Popups) | Ruby On Rails 7 Tutorial
12:49
Rails 7: The Demo
34:15
David Heinemeier Hansson
Рет қаралды 109 М.
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН