What you can do is, the hash where you specify the options for paperclip, how it connects to the S3 server, ie something like this
{
:storage => :fog,
:fog_credentials => {
:provider => 'AWS',
:aws_access_key_id => <YOUR_ACCESS_ID> ,
:aws_secret_access_key => <YOUR_SECRET_ACCESS_KEY>
},
:fog_directory => <YOUR_BUCKET_NAME>,
:fog_public => true,
:path => "system/:attachment/:id/:style/:filename"
}
In there, you can put in an option named "fog_host" like this:
:fog_host => "http://s3.amazonaws.com/<YOUR_BUCKET_NAME>"
This will generate urls without https and in the same format as that were generated by the aws-sdk gem. :)
{
:storage => :fog,
:fog_credentials => {
:provider => 'AWS',
:aws_access_key_id => <YOUR_ACCESS_ID> ,
:aws_secret_access_key => <YOUR_SECRET_ACCESS_KEY>
},
:fog_directory => <YOUR_BUCKET_NAME>,
:fog_public => true,
:path => "system/:attachment/:id/:style/:filename"
}
In there, you can put in an option named "fog_host" like this:
:fog_host => "http://s3.amazonaws.com/<YOUR_BUCKET_NAME>"
This will generate urls without https and in the same format as that were generated by the aws-sdk gem. :)
No comments:
Post a Comment