K
K
Karina2017-03-09 12:42:07
Ruby on Rails
Karina, 2017-03-09 12:42:07

How to send paperclip file to ftp?

I'm using the gem https://github.com/xing/paperclip-storage-ftp But I can't figure out what I'm doing wrong - why the url is wrong (each /images/original/missing.png entry has it). My settings

has_attached_file :image, {
    :storage => :ftp,

    :path => '/ftp/menu-images/:filename',

    :url => "http://site.com/ftp/menu-images/:filename",
    :ftp_servers => [
      {
        :host     => 'ip',
        :user     => 'username',
        :password => 'pass'
      },
    ],
    passive: true
  }

public/ftp/menu-images/ directory created in my rails app And I did mount --bind /home/ftp/menu-images/ /www/var/www/apps/app/current/public/ftp Files appear on disk - but the url of the entries is wrong.
Thanks to all

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question