get_object_url generates invalid policy for amazon s3 file when file name contains special or cyrillic characters.

145 views
Skip to first unread message

Alexey Zakharov

unread,
Mar 2, 2011, 2:20:02 PM3/2/11
to ruby...@googlegroups.com
Hi,

get_object_url generates invalid policy for amazon s3 file when file name contains special or cyrillic characters?

Look at this link: http://upload1.com/uploads/18

flower.jpg works fine, #1 GOON.jpg produce "SignatureDoesNotMatch"

here is source code for this image urls:

def url
connection.get_object_url("mybucket", "mypath", Time.now + 60*60)
end
def connection
Fog::Storage.new(
:provider => 'AWS',
:aws_secret_access_key =>"secret",
:aws_access_key_id => "access_key_id"
)
end

Regards,
Alexey

geemus

unread,
Mar 3, 2011, 5:06:17 PM3/3/11
to ruby-fog
I was having trouble testing with cyrillic, as my machine isn't really
setup for it. But the '#1 GOON.jpg' style is easier.

The problem is that when I add a file to one of my directories with
that name and generate a URL for it, things appear to work just fine.

What version of ruby and fog are you using?

wes

Alexey Zakharov

unread,
Mar 4, 2011, 3:39:50 AM3/4/11
to ruby...@googlegroups.com
Hi,

Thank you man, u saved my day.

I find source of problem. Build gem cause bundler to load fog 0.3.1 that seem to have that problem. When I removed builder gem from bundler and updated fog gem everything start working.

Regards,
Alexey


Reply all
Reply to author
Forward
0 new messages