Commit 4c7a3b1946515819a7a45b512ab0b964d3991268
1 parent
6b958d38
Exists in
master
and in
29 other branches
ActionItem1022: don't resize images anymore.
Showing
2 changed files
with
1 additions
and
27 deletions
Show diff stats
app/models/uploaded_file.rb
... | ... | @@ -12,8 +12,7 @@ class UploadedFile < Article |
12 | 12 | has_attachment :storage => :file_system, |
13 | 13 | :thumbnails => { :icon => [24,24], :thumb => '130x130>' }, |
14 | 14 | :thumbnail_class => Thumbnail, |
15 | - :max_size => 5.megabytes, | |
16 | - :resize_to => '640x480>' | |
15 | + :max_size => 5.megabytes | |
17 | 16 | |
18 | 17 | def self.max_size |
19 | 18 | UploadedFile.attachment_options[:max_size] | ... | ... |
test/unit/uploaded_file_test.rb
... | ... | @@ -102,29 +102,4 @@ class UploadedFileTest < Test::Unit::TestCase |
102 | 102 | file.destroy |
103 | 103 | end |
104 | 104 | |
105 | - should 'resize images bigger than in resize_to' do | |
106 | - fixture_filename = '/files/test-large-pic.jpg' | |
107 | - filename = RAILS_ROOT + '/test/fixtures' + fixture_filename | |
108 | - system('echo "image for test" | convert -background yellow -page 1280x960 text:- %s' % filename) | |
109 | - | |
110 | - f = UploadedFile.create(:profile => @profile, :uploaded_data => fixture_file_upload(fixture_filename, 'image/jpg')) | |
111 | - | |
112 | - assert_equal [640, 480], [f.width, f.height] | |
113 | - | |
114 | - File.rm_f(filename) | |
115 | - end | |
116 | - | |
117 | - should 'resize images on folder bigger than in resize_to' do | |
118 | - fixture_filename = '/files/test-large-pic.jpg' | |
119 | - filename = RAILS_ROOT + '/test/fixtures' + fixture_filename | |
120 | - system('echo "image for test" | convert -background yellow -page 1280x960 text:- %s' % filename) | |
121 | - f = Folder.create!(:name => 'test_folder', :profile => @profile) | |
122 | - | |
123 | - file = UploadedFile.create(:profile => @profile, :uploaded_data => fixture_file_upload(fixture_filename, 'image/jpg'), :parent_id => f.id) | |
124 | - | |
125 | - assert_equal [640, 480], [file.width, file.height] | |
126 | - | |
127 | - File.rm_f(filename) | |
128 | - end | |
129 | - | |
130 | 105 | end | ... | ... |