Skip to content
Shrine storage that handles file uploads via FTP
Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib/shrine/storage
spec
.gitignore
.rspec
Gemfile
Gemfile.lock
LICENSE
README.md
shrine-ftp.gemspec

README.md

shrine-ftp

Shrine storage that handles file uploads to an FTP server

Usage

Refer to the Shrine Quick start if you need to know how to set up storage in the first place.

require "shrine"
require "shrine/storage/file_system"
require "shrine-ftp"

storage = Shrine::Storage::Ftp.new(
    host: 'ftp.yourhost.com',
    user: 'ftp_user',
    passwd: 'ftp_password',
    dir: 'your/path/to/files',
    prefix: 'http://cdn.yourhost.com'
)

Shrine.storages = {
    cache: Shrine::Storage::FileSystem.new('public', prefix: 'uploads/cache'),
    store: storage
}
You can’t perform that action at this time.