Method: FileConvert.convert

Defined in:
lib/file_convert.rb

.convert(file_path, source_mime_type, target_mime_type) ⇒ FileConvert::Conversion

Parameters:

  • file_path (String)

    Source file for conversions

  • Source (String)

    file mime-type

  • Target (String)

    file mime-type (converion target)

Returns:



21
22
23
24
# File 'lib/file_convert.rb', line 21

def self.convert(file_path, source_mime_type, target_mime_type)
  upload = FileConvert::Upload.new(client, file_path, source_mime_type)
  FileConvert::Conversion.new(client, upload.file, target_mime_type)
end