CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Sun, 24 Aug 2025 05:29:07 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090917103536
location: https://web.archive.org/web/20090917103536/https://github.com/thoughtbot/paperclip/tree/v2.1.0
server-timing: captures_list;dur=0.514667, exclusion.robots;dur=0.019297, exclusion.robots.policy;dur=0.008775, esindex;dur=0.011291, cdx.remote;dur=4.890133, LoadShardBlock;dur=318.417350, PetaboxLoader3.datanode;dur=148.106961, PetaboxLoader3.resolve;dur=85.849287
x-app-server: wwwb-app220
x-ts: 302
x-tr: 357
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app220; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Sun, 24 Aug 2025 05:29:08 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.6.35
x-archive-orig-date: Thu, 17 Sep 2009 10:35:34 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "4add9082451e33e024968396dac4a5d6"
x-archive-orig-x-runtime: 312ms
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-orig-content-length: 28691
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Thu, 17 Sep 2009 10:35:36 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Mon, 04 Aug 2008 12:28:59 GMT", ; rel="prev memento"; datetime="Sun, 21 Jun 2009 23:38:56 GMT", ; rel="memento"; datetime="Thu, 17 Sep 2009 10:35:36 GMT", ; rel="next memento"; datetime="Sat, 12 Dec 2009 16:58:31 GMT", ; rel="last memento"; datetime="Wed, 14 Apr 2010 06:14:35 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_11_20090917085811_crawl103.gpg-c/52_11_20090917103303_crawl101.arc.gz
server-timing: captures_list;dur=0.487713, exclusion.robots;dur=0.019411, exclusion.robots.policy;dur=0.009274, esindex;dur=0.010332, cdx.remote;dur=8.296153, LoadShardBlock;dur=86.559521, PetaboxLoader3.datanode;dur=77.846933, PetaboxLoader3.resolve;dur=187.219722, load_resource;dur=200.043559
x-app-server: wwwb-app220
x-ts: 200
x-tr: 359
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
thoughtbot's paperclip at v2.1.0 - GitHub
This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (

This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (

Run the following if you haven't already:
gem sources -a https://gems.github.com
Install the gem(s):
sudo gem install thoughtbot-paperclip
Description: | Easy file attachment management for ActiveRecord edit |
Homepage: | https://www.thoughtbot.com/projects/paperclip edit |
Public Clone URL: |
git://github.com/thoughtbot/paperclip.git
Give this clone URL to anyone.
git clone git://github.com/thoughtbot/paperclip.git
|
Your Clone URL: |
Use this clone URL yourself.
git clone git@github.com:thoughtbot/paperclip.git
|
name | age | message | |
---|---|---|---|
![]() |
.gitignore | Loading commit data... ![]() |
|
![]() |
LICENSE | Fri Apr 18 09:08:33 -0700 2008 | Moved the License into its own file git-svn-i... [jyurek] |
![]() |
README | Fri Apr 18 09:08:33 -0700 2008 | Moved the License into its own file git-svn-i... [jyurek] |
![]() |
Rakefile | ||
![]() |
generators/ | Fri Oct 26 09:16:58 -0700 2007 | Did some APIish stuff. git-svn-id: https://svn... [jyurek] |
![]() |
init.rb | Fri Apr 18 09:08:54 -0700 2008 | Rearranged stuff and added a gem build/deploy p... [jyurek] |
![]() |
lib/ | ||
![]() |
tasks/ | ||
![]() |
test/ |
README
=Paperclip Paperclip is intended as an easy file attachment library for ActiveRecord. The intent behind it was to keep setup as easy as possible and to treat files as much like other attributes as possible. This means they aren't saved to their final locations on disk, nor are they deleted if set to nil, until ActiveRecord::Base#save is called. It manages validations based on size and presence, if required. It can transform its assigned image into thumbnails if needed, and the prerequisites are as simple as installing ImageMagick (which, for most modern Unix-based systems, is as easy as installing the right packages). Attached files are saved to the filesystem and referenced in the browser by an easily understandable specification, which has sensible and useful defaults. See the documentation for the +has_attached_file+ method for options. ==Usage In your model: class User < ActiveRecord::Base has_attached_file :avatar, :styles => { :medium => "300x300>", :thumb => "100x100>" } end In your migrations: class AddAvatarColumsToUser < ActiveRecord::Migration def self.up add_column :users, :avatar_file_name, :string add_column :users, :avatar_content_type, :string add_column :users, :avatar_file_size, :integer end def self.down remove_column :users, :avatar_file_name remove_column :users, :avatar_content_type remove_column :users, :avatar_file_size end end In your edit and new views: <% form_for :user, @user, :url => user_path, :html => { :multipart => true } do |form| %> <%= form.file_field :avatar %> <% end %> In your controller: def create @user = User.create( params[:user] ) end In your show view: <%= image_tag @user.avatar.url %> <%= image_tag @user.avatar.url(:medium) %> <%= image_tag @user.avatar.url(:thumb) %>
This feature is coming soon. Sit tight!