Skip to content
Plugin for Paperclip: Allows fetching attachments from remote locations
Ruby
Find file
Pull request Compare This branch is 12 commits behind bsm:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
rails
spec
.gitignore
.rspec
.travis.yml
Gemfile
Gemfile.lock
Gemfile.paperclip-2.3.x
Gemfile.paperclip-2.3.x.lock
Gemfile.paperclip-2.4.x
Gemfile.paperclip-2.4.x.lock
Gemfile.paperclip-2.5.x
Gemfile.paperclip-2.5.x.lock
Gemfile.paperclip-2.6.x
Gemfile.paperclip-2.6.x.lock
LICENSE
README.rdoc
Rakefile
paperclip-remote.gemspec

README.rdoc

Paperclip remote URL plugin

Allows fetching files/attachments from remote locations.

Installation

Just add gem paperclip-remote to your Gemfile.

Alternatively, run sudo gem install paperclip-remote and add require 'paperclip_remote' to your app.

Example

In the model, you can specify:

class User < ActiveRecord::Base
  has_attached_file :photo, :remote => true
  attr_accessible   :photo, :photo_remote_url
end

In the form you can then have:

<%= f.label :photo, "Please update a photo" %>
<%= f.file_field :photo %>
<br/>
<%= f.label :photo_remote_url, "or specify a URL" %>
<%= f.text_field :photo_remote_url %>
Something went wrong with that request. Please try again.