add bootstrap file input and menu item img implemented
This commit is contained in:
@@ -8,13 +8,21 @@ class MenuItemImageUploader < CarrierWave::Uploader::Base
|
||||
storage :file
|
||||
# storage :fog
|
||||
|
||||
def root
|
||||
Rails.root.join 'public/'
|
||||
end
|
||||
|
||||
# Override the directory where uploaded files will be stored.
|
||||
# This is a sensible default for uploaders that are meant to be mounted:
|
||||
def store_dir
|
||||
"public/image/menu_images"
|
||||
"image/menu_images"
|
||||
# "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
|
||||
end
|
||||
|
||||
# def cache_dir
|
||||
# '/tmp/images'
|
||||
# end
|
||||
|
||||
# Provide a default URL as a default if there hasn't been a file uploaded:
|
||||
# def default_url(*args)
|
||||
# # For Rails 3.1+ asset pipeline compatibility:
|
||||
|
||||
Reference in New Issue
Block a user