Save image from url to blob

Hello,

I would like to save jpg images from urls similar to the one below to
a field defined as a blob, but I am not sure how to code it.

image
15943-0

Is this how it should be coded if the url was extracted?

image_file = Image.new
image_file.blob_image_field = open(http://images.mywebsite.com/
5f52f047f131d.jpg)
image_file.save

Thanks,

Frank

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs