Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3401888
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:04:15+00:00 2026-05-18T05:04:15+00:00

How can I upload a file with paperclip via the console or a in

  • 0

How can I upload a file with paperclip via the console or a in a rake task? I’m a little unsure how this works without a form. Has anyone dealt with this?


update

So I found this:

image = Image.new(:storage => File.open('/path/to/my/image.png', rb))

But I guess this makes my question a little simpler, say my photo was actually online (at varying domains) and I wanted to take it with paperclip and transform it and upload it to my server. Is it possible to somehow give File.open a url?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T05:04:16+00:00Added an answer on May 18, 2026 at 5:04 am

    Give this a shot.

    require 'open-uri'
    image = Image.new(:storage => open("http://path.to.the/image.png"))
    

    Worked when I tried it in my terminal I just did:

    require 'open-uri'
    image = open("https://i.stack.imgur.com/qjKuQ.jpg")
    

    which resulted in:

    => #<File:/var/folders/Zo/ZoJYH-A6Eg8GQ3pV0fIyhU+++TU/-Tmp-/open-uri20101117-5813-1h64t5k>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form where the user can upload a zip file, it works
I have string like this: G:\Projects\TestApp\TestWeb\Files\Upload\file.jpg How can I remove all text before Files
I need to create a form where users can upload a file, and based
I have a part of a form where a user can upload a file.
So I have a form, and in this form a user can upload a
I have a page where a user can upload a file along with some
How can I upload a File (graphic, audio and video file) with Android using
Can I use FlexUnit to unit test a File Upload and delete? Are those
How can one best test a controller action which receives a file upload using
I have a page where the user can dynamically add file upload boxes. Adding

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.