Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix issue encountered when trying to reopen a file stored remotely #2185

Merged
merged 5 commits into from
Jul 12, 2017

Conversation

zog
Copy link
Contributor

@zog zog commented May 29, 2017

When one tries to reopen a fog-stored file after it has been persisted, they get an error:

Magick::ImageMagickError: unable to open image

This is because the RMagick processor tries to open the file from its current_path, which in this case is the path on the remote server.
This is easily fixed by letting the uploader get the content og the image and send it to ::Magick::Image.from_blob

@thiagofm
Copy link
Member

thiagofm commented Jul 7, 2017

Can you please add tests?

@zog
Copy link
Contributor Author

zog commented Jul 7, 2017

There you are.

@@ -220,6 +220,38 @@
end
end

describe "#rmagick_image", focus: true do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

focus: true needs to be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops :)

@mshibuya mshibuya merged commit f43c068 into carrierwaveuploader:master Jul 12, 2017
@mshibuya
Copy link
Member

Nice, thanks!

vprigent added a commit to 3print/boilerplate that referenced this pull request Aug 2, 2017
Shall drop as soon as carrierwaveuploader/carrierwave#2185 is ready to be used
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants