Created
October 11, 2012 21:48
-
-
Save joshellington/3875721 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def save_thumb media_id | |
local_path = Rails.root.to_s + '/public/media_thumbs/thumbapp_' + media_id + '.png' | |
remote_path = 'http://emgklovf.rtmphost.com/http/thumbnail_app/thumbapp_'+media_id+'.png' | |
open(local_path, 'wb') do |file| | |
file << open(remote_path, :ssl_verify_mode => OpenSSL::SSL::VERIFY_NONE).read | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment