Skip to content

Commit

Permalink
Add support for png, jpg, txt and gif catalyst#6
Browse files Browse the repository at this point in the history
  • Loading branch information
aspark21 authored Apr 28, 2019
1 parent 3f66271 commit cb5f9ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion classes/converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ class converter implements \core_files\converter_interface {
'html' => 'text/html',
'odt' => 'application/vnd.oasis.opendocument.text',
'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
'png' => 'image/png',
'jpg' => 'image/jpeg',
'txt' => 'text/plain',
'gif' => 'image/gif',
];

/** @var array $export List of supported export file formats */
Expand Down Expand Up @@ -412,6 +416,6 @@ public static function supports($from, $to) {
* @return string
*/
public function get_supported_conversions() {
return implode(', ', ['doc', 'docx', 'rtf', 'xls', 'xlsx', 'ppt', 'pptx', 'html', 'odt', 'ods', 'pdf']);
return implode(', ', ['doc', 'docx', 'rtf', 'xls', 'xlsx', 'ppt', 'pptx', 'html', 'odt', 'ods', 'txt', 'png', 'jpg', 'gif', 'pdf']);
}
}

1 comment on commit cb5f9ee

@aspark21
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.