Arc Rackspace provides an Arc
storage back-end for Rackspace
.
WARNING: This is a development version: It contains the latest changes, but may also have several known issues, including crashes and data loss situations. In fact, it may not work at all.
Add the latest stable release to your mix.exs
file:
defp deps do
[
arc_rackspace: "~> 0.0.3"
]
end
You must also add arc_rackspace
as startup dependencies your application's mix.exs
file:
def application do
[mod: {MyApp, []},
applications: [:phoenix, :phoenix_pubsub, :phoenix_html, :cowboy, :logger, :gettext,
:phoenix_ecto, :postgrex, :arc_rackspace]]
end
Then run mix deps.get
in your shell to fetch the dependencies.
To store your attachments in Rackspace Cloud Files
, you'll need to provide a bucket destination in your application config:
config :arc,
storage: Arc.Storage.Rackspace,
rackspace_container_name: 'default',
rackspace_cdn_url: 'http://XYZ.r54.cf3.rackcdn.com/'
In addition, Rackspace must be configured with the appropriate credentials.
config :rackspace, :api,
api_key: "xxxxxxxxxxxxx",
username: "yyyyyyyyyyyyy",
password: "zzzzzzzzzzzzz"
Connection to Rackspace API's will require your username and either your account password, or your account api key. It is recommended that you use the api key which can be obtained by logging into your Rackspace account.
You probably want to load the private key from an ENV variable rather than hard-code it the config.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Author: 2016-2017 Anton Maminov
Copyright: 2016-2017 Lokalebasen.dk
This project is licensed under the MIT license, a copy of which can be found in the LICENSE file.