-
Notifications
You must be signed in to change notification settings - Fork 64
Description
I have setup carrierwave-ftp to upload image files to a remote ftp server. I am able to upload files to the server without any issues. However, the same images uploaded cannot be read back. I get permission denied error messages. I have used similar setup with carrierwave to upload files to Dropbox without any problems.
My config file looks like this:
CarrierWave.configure do |config|
config.ftp_host = “example.com”
config.ftp_port = 21
config.ftp_user = “username”
config.ftp_passwd = “passord”
config.ftp_folder = "/home5/rails"
config.ftp_url = "ftp://example.com/home5/rails"
config.ftp_passive = false
config.ftp_tls = false
end
My uploader file looks like this:
class ImageUploader < CarrierWave::Uploader::Base
include CarrierWave::MiniMagick
storage :ftp
def store_dir
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end
version :thumb do
process resize_to_fit: [250, 250]
end
def extension_whitelist
%w(jpg jpeg gif png)
end
end