aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/lib/active_storage/engine.rb
diff options
context:
space:
mode:
authorTerence Lee <hone02@gmail.com>2018-02-05 19:33:35 -0600
committerGeorge Claghorn <george@basecamp.com>2018-03-06 13:33:33 -0500
commit0b717c20458d12191f479fc693dd1ca1eb11c050 (patch)
tree6bcd9dd08f792a35235a96f392a79fd2ac0cdbc2 /activestorage/lib/active_storage/engine.rb
parent060ed201e444785135ce9a4baea069079257295e (diff)
downloadrails-0b717c20458d12191f479fc693dd1ca1eb11c050.tar.gz
rails-0b717c20458d12191f479fc693dd1ca1eb11c050.tar.bz2
rails-0b717c20458d12191f479fc693dd1ca1eb11c050.zip
Provide an alternative PDF previewer based on Poppler
mutool is licensed under the Affero GPL, which has strict distribution requirements. Poppler is licensed under the more liberal GPL, making it a good alternative for those who can't use mutool.
Diffstat (limited to 'activestorage/lib/active_storage/engine.rb')
-rw-r--r--activestorage/lib/active_storage/engine.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activestorage/lib/active_storage/engine.rb b/activestorage/lib/active_storage/engine.rb
index 1e223f9f17..1385e2aa84 100644
--- a/activestorage/lib/active_storage/engine.rb
+++ b/activestorage/lib/active_storage/engine.rb
@@ -3,7 +3,8 @@
require "rails"
require "active_storage"
-require "active_storage/previewer/pdf_previewer"
+require "active_storage/previewer/poppler_pdf_previewer"
+require "active_storage/previewer/mupdf_previewer"
require "active_storage/previewer/video_previewer"
require "active_storage/analyzer/image_analyzer"
@@ -14,7 +15,7 @@ module ActiveStorage
isolate_namespace ActiveStorage
config.active_storage = ActiveSupport::OrderedOptions.new
- config.active_storage.previewers = [ ActiveStorage::Previewer::PDFPreviewer, ActiveStorage::Previewer::VideoPreviewer ]
+ config.active_storage.previewers = [ ActiveStorage::Previewer::PopplerPDFPreviewer, ActiveStorage::Previewer::MuPDFPreviewer, ActiveStorage::Previewer::VideoPreviewer ]
config.active_storage.analyzers = [ ActiveStorage::Analyzer::ImageAnalyzer, ActiveStorage::Analyzer::VideoAnalyzer ]
config.active_storage.paths = ActiveSupport::OrderedOptions.new