Changed GoogleAccessKeyId to GoogleAccessId

I struggled with this for four hours today. Finally found this:
https://groups.google.com/forum/?fromgroups=#!topic/gs-discussion/iahTA7C2nmE

which led me to this:
https://developers.google.com/storage/docs/accesscontrol#Signed-URLs

Tested that it works, but don't want to do gsubs for this in every URL generated by Carrierwave + fog in my app.
This commit is contained in:
althras 2013-03-09 23:48:39 +08:00
parent 1e6da326a3
commit c63ba09b88
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ module Fog
params[:headers]['Date'] = expires.to_i
params[:path] = CGI.escape(params[:path]).gsub('%2F', '/')
query = [params[:query]].compact
query << "GoogleAccessKeyId=#{@google_storage_access_key_id}"
query << "GoogleAccessId=#{@google_storage_access_key_id}"
query << "Signature=#{CGI.escape(signature(params))}"
query << "Expires=#{params[:headers]['Date']}"
"#{params[:host]}/#{params[:path]}?#{query.join('&')}"