Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 815 Bytes

README.rdoc

File metadata and controls

28 lines (19 loc) · 815 Bytes

Paperclip remote URL plugin

<img src=“https://travis-ci.org/bsm/paperclip_remote.png?branch=master” alt=“Build Status” /> 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 %>