batch import does not create thumbnails and does not take into account MetaModel attachment options
Orion98MC opened this issue · 0 comments
When importing images in batch from local directory, some of the meta model options for has_attachment are not taken into account.
MetaModel Picture:
class Picture < ActiveRecord::Base
belongs_to :webdata
acts_as_list :scope => :webdata
has_attachment :content_type => :image,
:storage => :file_system,
:path_prefix => 'public/pictures',
:partition => false,
:max_size => 5.megabytes,
:resize_to => '960x640>',
:thumbnails => {
:iP4 => '160',
:iP => '80'
}
validates_as_attachment
end
in a rake task:
picture = Picture.new(
:uploaded_data => ActionController::TestUploadedFile.new(tmpfile_path, content_type)
)
Pictures are imported but size constraint and thumbnails options are not taken into account, no thumbnails are created and pictures are not resized.