Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/uploaders/attachment_uploader.rb')
-rw-r--r--app/uploaders/attachment_uploader.rb26
1 files changed, 0 insertions, 26 deletions
diff --git a/app/uploaders/attachment_uploader.rb b/app/uploaders/attachment_uploader.rb
deleted file mode 100644
index a9691bee46e..00000000000
--- a/app/uploaders/attachment_uploader.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# encoding: utf-8
-
-class AttachmentUploader < CarrierWave::Uploader::Base
- storage :file
-
- def store_dir
- "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
- end
-
- def image?
- img_ext = %w(png jpg jpeg gif bmp tiff)
- if file.respond_to?(:extension)
- img_ext.include?(file.extension.downcase)
- else
- # Not all CarrierWave storages respond to :extension
- ext = file.path.split('.').last.downcase
- img_ext.include?(ext)
- end
- rescue
- false
- end
-
- def file_storage?
- self.class.storage == CarrierWave::Storage::File
- end
-end