lib/fleximage/model.rb
# Perform pre save tasks.  Preprocess the image, and write it to DB.
Perform pre save tasks.  Preprocess the image, and write it to DB.
Perform pre save tasks . Preprocess the image and write it to DB .
def pre_save
          if @uploaded_image
            perform_preprocess_operation
            @uploaded_image.format = self.class.image_storage_format.to_s.upcase unless respond_to?(:image_format)
            if self.class.db_store?
              self.image_file_data = @uploaded_image.to_blob
            end
          end
        end
def pre_save if @uploaded_image perform_preprocess_operation @uploaded_image . format = self . class . image_storage_format . to_s . upcase unless respond_to? ( :image_format ) if self . class . db_store? self . image_file_data = @uploaded_image . to_blob end end end
Perform pre save tasks.
Perform pre save tasks .
# perform preprocessing # Convert to storage format # Write image data to the DB field