summaryrefslogtreecommitdiff
path: root/app/uploaders
diff options
context:
space:
mode:
Diffstat (limited to 'app/uploaders')
-rw-r--r--app/uploaders/backup_file_uploader.rb6
-rw-r--r--app/uploaders/fax_document_uploader.rb19
2 files changed, 22 insertions, 3 deletions
diff --git a/app/uploaders/backup_file_uploader.rb b/app/uploaders/backup_file_uploader.rb
index 8b126a9..0244ba5 100644
--- a/app/uploaders/backup_file_uploader.rb
+++ b/app/uploaders/backup_file_uploader.rb
@@ -42,9 +42,9 @@ class BackupFileUploader < CarrierWave::Uploader::Base
# Add a white list of extensions which are allowed to be uploaded.
# For images you might use something like this:
- # def extension_white_list
- # %w(jpg jpeg gif png)
- # end
+ def extension_white_list
+ %w(tar.gz)
+ end
# Override the filename of the uploaded files:
# Avoid using model.id or version_name here, see uploader/store.rb for details.
diff --git a/app/uploaders/fax_document_uploader.rb b/app/uploaders/fax_document_uploader.rb
new file mode 100644
index 0000000..bfb7e07
--- /dev/null
+++ b/app/uploaders/fax_document_uploader.rb
@@ -0,0 +1,19 @@
+# encoding: utf-8
+
+class FaxDocumentUploader < CarrierWave::Uploader::Base
+ include CarrierWave::MiniMagick
+
+ storage :file
+
+ def store_dir
+ model.store_dir
+ end
+
+ def cache_dir
+ '/tmp/gs_fax_uploader'
+ end
+
+ def extension_white_list
+ %w(pdf ps jpg jpeg gif png tif tiff)
+ end
+end