diff --git a/app/uploaders/file_uploader.rb b/app/uploaders/file_uploader.rb
index 4b6080f..a2c0325 100644
--- a/app/uploaders/file_uploader.rb
+++ b/app/uploaders/file_uploader.rb
@@ -8,7 +8,7 @@ class FileUploader < CarrierWave::Uploader::Base
include CarrierWave::MiniMagick
# Choose what kind of storage to use for this uploader
if ENV['S3_KEY']
- storage :s3
+ storage :fog
def cache_dir
"#{RAILS_ROOT}/tmp/uploads" if ENV['HEROKU'] == 'true'
diff --git a/app/views/photos/_form.html.erb b/app/views/photos/_form.html.erb
index f21f7db..3201554 100644
--- a/app/views/photos/_form.html.erb
+++ b/app/views/photos/_form.html.erb
@@ -11,4 +11,4 @@
<%= form.label :description %>
<%= form.text_area :description %>
-
On disk: ~/<%= @photo.file.file.file %>
\ No newline at end of file +On disk: ~/<%= @photo.file.path %>
\ No newline at end of file diff --git a/config/initializers/s3.rb b/config/initializers/s3.rb index c0bcd6f..115ea44 100644 --- a/config/initializers/s3.rb +++ b/config/initializers/s3.rb @@ -1,5 +1,9 @@ CarrierWave.configure do |config| - config.s3_access_key_id = ENV['S3_KEY'] - config.s3_secret_access_key = ENV['S3_SECRET'] - config.s3_bucket = ENV['S3_BUCKET'] - end \ No newline at end of file + config.fog_credentials = { + :provider => 'AWS', + :aws_access_key_id => ENV['S3_KEY'], + :aws_secret_access_key => ENV['S3_SECRET'], + :region => 'us-east-1' + } + config.fog_directory = ENV['S3_BUCKET'] +end \ No newline at end of file