fog very slow deleting files. trying aws gem instead
This commit is contained in:
parent
5da472e772
commit
7acec90448
3
Gemfile
3
Gemfile
|
@ -12,7 +12,8 @@ gem "carrierwave", :git => 'git://github.com/jnicklas/carrierwave.git'
|
|||
gem 'sqlite3-ruby'
|
||||
|
||||
# S3 support
|
||||
gem 'fog'
|
||||
#gem 'fog'
|
||||
gem 'aws'
|
||||
|
||||
# ImageMagick:
|
||||
#gem "rmagick", :require => 'RMagick'
|
||||
|
|
25
Gemfile.lock
25
Gemfile.lock
|
@ -36,22 +36,16 @@ GEM
|
|||
activesupport (= 3.0.6)
|
||||
activesupport (3.0.6)
|
||||
arel (2.0.9)
|
||||
aws (2.4.5)
|
||||
activesupport
|
||||
http_connection
|
||||
uuidtools
|
||||
xml-simple
|
||||
builder (2.1.2)
|
||||
erubis (2.6.6)
|
||||
abstract (>= 1.0.0)
|
||||
excon (0.6.1)
|
||||
fog (0.7.2)
|
||||
builder
|
||||
excon (>= 0.6.1)
|
||||
formatador (>= 0.1.3)
|
||||
json
|
||||
mime-types
|
||||
net-ssh (>= 2.1.3)
|
||||
nokogiri (>= 1.4.4)
|
||||
ruby-hmac
|
||||
formatador (0.1.3)
|
||||
http_connection (1.4.0)
|
||||
i18n (0.5.0)
|
||||
json (1.5.1)
|
||||
mail (2.2.15)
|
||||
activesupport (>= 2.3.6)
|
||||
i18n (>= 0.4.0)
|
||||
|
@ -61,8 +55,6 @@ GEM
|
|||
mini_exiftool (1.3.0)
|
||||
mini_magick (3.2)
|
||||
subexec (~> 0.0.4)
|
||||
net-ssh (2.1.4)
|
||||
nokogiri (1.4.4)
|
||||
polyglot (0.3.1)
|
||||
rack (1.2.2)
|
||||
rack-mount (0.6.14)
|
||||
|
@ -83,7 +75,6 @@ GEM
|
|||
rake (>= 0.8.7)
|
||||
thor (~> 0.14.4)
|
||||
rake (0.8.7)
|
||||
ruby-hmac (0.4.0)
|
||||
sqlite3 (1.3.3)
|
||||
sqlite3-ruby (1.3.3)
|
||||
sqlite3 (>= 1.3.3)
|
||||
|
@ -92,13 +83,15 @@ GEM
|
|||
treetop (1.4.9)
|
||||
polyglot (>= 0.3.1)
|
||||
tzinfo (0.3.26)
|
||||
uuidtools (2.1.2)
|
||||
xml-simple (1.0.15)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
aws
|
||||
carrierwave!
|
||||
fog
|
||||
mime-types
|
||||
mini_exiftool
|
||||
mini_magick
|
||||
|
|
|
@ -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 :fog
|
||||
storage :s3
|
||||
|
||||
def cache_dir
|
||||
"#{RAILS_ROOT}/tmp/uploads" if ENV['HEROKU'] == 'true'
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
CarrierWave.configure do |config|
|
||||
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']
|
||||
config.s3_access_key_id = ENV['S3_KEY']
|
||||
config.s3_secret_access_key = ENV['S3_SECRET']
|
||||
config.s3_bucket = ENV['S3_BUCKET']
|
||||
#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
|
Loading…
Reference in a new issue