I have a rails application that allows users to upload audio and video. The audio and video are then delivered to our HTML5 App. We are using rackspace CloudFiles (private) to store all of the file and everything works nicely.
The problem is trying to get the video to Android users (Android doesn't like to play HTTPS media files).
To solve this I am looking for a way to create the temp url without an HTTPS link.
Any help wold be greatly appreciated.
Thanks.
require "openssl"
cloudfiles_folder = FOLDER_NAME
url_string = ASSET_URL_STRING_FROM_PAPERCLIP
method = "GET"
base_url, object_path = ("http://storage101.ord1.clouddrive.com/v1/MossoCloudFS_HIDING_REST_OF_URL/"+cloudfiles_folder+"/"+url_string ).split(/\/v1\//)
object_path = "/v1/" + object_path
seconds = 1200
expires = (Time.now + seconds).to_i
hmac_body = "#{method}\n#{expires}\n#{object_path}"
sig = OpenSSL::HMAC.hexdigest("sha1", ENV["RACKSPACE_TEMP_URL_KEY"], hmac_body)
puts ("#{base_url}#{object_path}?" + "temp_url_sig=#{sig}&temp_url_expires=#{expires}")