Skip to content

Instantly share code, notes, and snippets.

@joshellington
Created October 11, 2012 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshellington/3875721 to your computer and use it in GitHub Desktop.
Save joshellington/3875721 to your computer and use it in GitHub Desktop.
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