Class: PandaProcessor
- Inherits:
-
Paperclip::Processor
- Object
- Paperclip::Processor
- PandaProcessor
- Defined in:
- lib/panda-processor.rb
Instance Method Summary collapse
Instance Method Details
#make ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/panda-processor.rb', line 2 def make begin Tinify.key = Rails.application.secrets.panda_api_key source = Tinify.from_file(File.(file.path)) source.to_file(File.(file.path)) file rescue Tinify::AccountError, Tinify::ServerError, Tinify::ConnectionError => e puts 'CUSTOM TinifyError: ' + e. file rescue => e .error(e) file end end |