Module: ConvertFileType
- Extended by:
- ActiveSupport::Concern
- Included in:
- EVSSClaimDocumentUploaderBase, LighthouseDocumentUploaderBase
- Defined in:
- app/uploaders/convert_file_type.rb
Instance Method Summary collapse
Instance Method Details
#converted_exists? ⇒ Boolean
31 32 33 |
# File 'app/uploaders/convert_file_type.rb', line 31 def converted_exists? converted.present? && converted.file.exists? end |
#final_filename ⇒ Object
35 36 37 38 39 40 41 |
# File 'app/uploaders/convert_file_type.rb', line 35 def final_filename if converted_exists? converted.file.filename else file.filename end end |
#read_for_upload ⇒ Object
43 44 45 46 47 48 49 |
# File 'app/uploaders/convert_file_type.rb', line 43 def read_for_upload if converted_exists? converted.read else read end end |