background processing

97 views
Skip to first unread message

Jonathan Sleeuw

unread,
May 2, 2012, 1:45:57 AM5/2/12
to carri...@googlegroups.com
i have an original image being uploaded to S3 via a carrierwave uploader that is part of a rails web app. what i would then like to do is kick off some additional processing on the same image using a carrierwave uploader that is run as an iron.io ironworker.

how would i go about initializing the ironworker uploader to get a handle on the previously uploaded image? would "retrieve_from_store!" do the trick? if so what kind of identifier would i need to pass? url?

Daniel Doubrovkine

unread,
May 2, 2012, 10:23:12 AM5/2/12
to carri...@googlegroups.com
If you're using ImageMagick, the following will retrieve the image from S3 and give you a handle on it:

manipulate! do |image|
end

If you don't want to open the image, or aren't using ImageMagick, you can do this

cache_stored_file! if !cached?
# file now in current_path, so you can do
File.open(current_path, "rb") do ...

On Wed, May 2, 2012 at 1:45 AM, Jonathan Sleeuw <jsl...@gmail.com> wrote:
i have an original image being uploaded to S3 via a carrierwave uploader that is part of a rails web app. what i would then like to do is kick off some additional processing on the same image using a carrierwave uploader that is run as an iron.io ironworker.

how would i go about initializing the ironworker uploader to get a handle on the previously uploaded image? would "retrieve_from_store!" do the trick? if so what kind of identifier would i need to pass? url?

--
You received this message because you are subscribed to the Google Groups "carrierwave" group.
To view this discussion on the web visit https://groups.google.com/d/msg/carrierwave/-/qpGtDK2hykkJ.
To post to this group, send email to carri...@googlegroups.com.
To unsubscribe from this group, send email to carrierwave...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/carrierwave?hl=en.



--

dB. | Moscow - Geneva - Seattle - New York
dblock.org - @dblockdotorg


Jonathan Sleeuw

unread,
May 2, 2012, 8:29:41 PM5/2/12
to carri...@googlegroups.com
Thanks Daniel, just looked through the docs for both of those methods and it looks as though either should work for me. As long as I pass the url in as a parameter / implement necessary methods (current_path, for example) to get at the remote file, i should be good to go!


On Wednesday, May 2, 2012 11:23:12 PM UTC+9, Daniel Doubrovkine wrote:
If you're using ImageMagick, the following will retrieve the image from S3 and give you a handle on it:

manipulate! do |image|
end

If you don't want to open the image, or aren't using ImageMagick, you can do this

cache_stored_file! if !cached?
# file now in current_path, so you can do
File.open(current_path, "rb") do ...
On Wed, May 2, 2012 at 1:45 AM, Jonathan Sleeuw <jsl...@gmail.com> wrote:
i have an original image being uploaded to S3 via a carrierwave uploader that is part of a rails web app. what i would then like to do is kick off some additional processing on the same image using a carrierwave uploader that is run as an iron.io ironworker.

how would i go about initializing the ironworker uploader to get a handle on the previously uploaded image? would "retrieve_from_store!" do the trick? if so what kind of identifier would i need to pass? url?

--
You received this message because you are subscribed to the Google Groups "carrierwave" group.
To view this discussion on the web visit https://groups.google.com/d/msg/carrierwave/-/qpGtDK2hykkJ.
To post to this group, send email to carri...@googlegroups.com.
To unsubscribe from this group, send email to carrierwave+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/carrierwave?hl=en.
Reply all
Reply to author
Forward
0 new messages