module Ecom module Core class PhotoUploader < CarrierWave::Uploader::Base storage :file def store_dir "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" end def extension_whitelist %w[jpg jpeg gif png] end def filename original_filename end end end end