Skip to content

Instantly share code, notes, and snippets.

@withhawaii
Created September 19, 2014 20:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save withhawaii/4527bfdbe4fd1d52f67a to your computer and use it in GitHub Desktop.
Save withhawaii/4527bfdbe4fd1d52f67a to your computer and use it in GitHub Desktop.
Setting up Paperclip to upload files into OpenStack object storage
Paperclip::Attachment.default_options.update(
{
:path => ":class/:attachment/:hash/:style.:extension",
:storage => :fog,
:fog_credentials => {
:provider => 'OpenStack',
:openstack_username => 'user',
:openstack_api_key => 'password',
:openstack_auth_url => 'auth_url',
},
:fog_directory => "bucketname",
:fog_host => "object_store_endpoint_url",
:fog_public => true
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment