Skip to content

mkou/paperclip-sftp-storage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Paperclip sftp Storage

Allow Paperclip attachments to be stored on SFTP servers. Inspired from [paperclip-storage-ftp] (https://github.com/xing/paperclip-storage-ftp)

Usage

Somewhere in your code:

require "paperclip/storage/sftp"

In your model:

class User < ActiveRecord::Base
  has_attached_file :avatar,

    # Choose the SFTP storage backend
    :storage => :sftp,
    # The list of SFTP options
    :sftp_options => [
      {
        :host      => "sftp.example.com",
        :directory => "my_assets_repository", #optional
        :path      => ":attachment/:id/:style/:filename",
        :user      => "foo"
      }
end

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages