Issue with cache_storage and processing on aws.
HuntBurdick opened this issue · 3 comments
HuntBurdick commented
I could never get config.cache_storage = :aws
to work, I kept getting the wrong tmp url. I copied the repo and changed (more like hacked), these lines to get it to work.
store_asset_mixin.rb starting at line 34:
def store_directories(record)
asset, asset_tmp = record.send(:"#{column}"), record.send(:"#{column}_tmp")
cache_directory = File.expand_path(asset.cache_dir, asset.root)
# XXX Hardcoded our path here... not ideal..
@cache_path = open("https://s3-us-west-1.amazonaws.com/edealer/uploads/tmp/#{asset_tmp}")
@tmp_directory = File.join(cache_directory, asset_tmp.split("/").first)
end
What is the right way to do this? This works for now but not super comfortable pointing to my modified repo: https://github.com/EDealerDirect/carrierwave_backgrounder
.
Thanks!
kenzo2013 commented
Please help.... i have the same problem.
HuntBurdick commented
If I recall correctly, this is the only line I changed:
# XXX Hardcoded our path here... not ideal..
@cache_path = open("https://s3-us-west-1.amazonaws.com/edealer/uploads/tmp/#{asset_tmp}")
lardawge commented
Closing this because it is outdated. Sorry for the silence on my end.