CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Thu, 07 Aug 2025 12:03:16 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20091217041051
location: https://web.archive.org/web/20091217041051/https://github.com/thoughtbot/paperclip/tree/v2.1.1
server-timing: captures_list;dur=0.643779, exclusion.robots;dur=0.030132, exclusion.robots.policy;dur=0.014894, esindex;dur=0.010600, cdx.remote;dur=265.394753, LoadShardBlock;dur=955.183294, PetaboxLoader3.datanode;dur=154.549062, PetaboxLoader3.resolve;dur=448.754590
x-app-server: wwwb-app223
x-ts: 302
x-tr: 1284
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app223; 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: Thu, 07 Aug 2025 12:03:17 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.7.61
x-archive-orig-date: Thu, 17 Dec 2009 04:10:51 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "6edeeac1011fbb956b636c7ee8cc0540"
x-archive-orig-x-runtime: 85ms
x-archive-orig-content-length: 30849
x-archive-orig-set-cookie: _github_ses=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--884981fc5aa85daf318eeff084d98e2cff92578f; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Thu, 17 Dec 2009 04:10:51 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Mon, 04 Aug 2008 12:29:04 GMT", ; rel="prev memento"; datetime="Mon, 14 Sep 2009 23:41:20 GMT", ; rel="memento"; datetime="Thu, 17 Dec 2009 04:10:51 GMT", ; rel="next memento"; datetime="Mon, 15 Feb 2010 01:03:31 GMT", ; rel="last memento"; datetime="Wed, 16 Jun 2010 21:13:40 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_13_20091217015101_crawl101-c/52_13_20091217041043_crawl101.arc.gz
server-timing: captures_list;dur=0.552520, exclusion.robots;dur=0.021180, exclusion.robots.policy;dur=0.010781, esindex;dur=0.013253, cdx.remote;dur=19.176155, LoadShardBlock;dur=421.126094, PetaboxLoader3.datanode;dur=397.786599, load_resource;dur=309.569472, PetaboxLoader3.resolve;dur=200.374855
x-app-server: wwwb-app223
x-ts: 200
x-tr: 825
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.1 - 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 (

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 | Fri May 02 13:34:39 -0700 2008 | Added a validation to validate against the cont... [austin.bain] |
![]() |
LICENSE | Fri Apr 18 09:08:33 -0700 2008 | Moved the License into its own file git-svn-i... [jyurek] |
![]() |
README | Thu Apr 17 13:10:52 -0700 2008 | Moved the License into its own file [jyurek] |
![]() |
Rakefile | Fri Apr 18 07:22:33 -0700 2008 | Rearranged stuff and added a gem build/deploy p... [jyurek] |
![]() |
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/ | Tue May 13 10:23:48 -0700 2008 | Added reprocess! method. The rake task will act... [jyurek] |
![]() |
tasks/ | Tue May 13 10:23:48 -0700 2008 | Added reprocess! method. The rake task will act... [jyurek] |
![]() |
test/ | Tue May 13 10:50:35 -0700 2008 | Added a test for reprocess\! [jyurek] |
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!