Closed cybernotic closed 8 months ago
Quick update on this we looked at getting that fixed in core but apparently it's up to each plugin to address (https://tracker.moodle.org/browse/MDL-69616)
I think it'll also explains #41 as a lot of phones save image filetypes in capitals - that's how we came across it
This can be fixed here https://github.com/catalyst/moodle-fileconverter_librelambda/blob/master/classes/converter.php#L424 including the strtolower function:
public static function supports($from, $to) {
// This is not a one-liner because of php 5.6.
$imports = self::$imports;
$exports = self::$exports;
return isset($imports[\core_text::strtolower($from)]) && isset($exports[$to]);
}
Hi all,
I am closing this issue as it is fixed on: https://github.com/catalyst/moodle-fileconverter_librelambda/pull/72
Hi Matt, I have just come across potential issues involving extension type names. If a file has a uppercase extension (which sometimes occur with image files) this will fail as an unrecognised format because the list of supported import file formats are in lowercase.
I tested this by changing a file extension (xxx.png) to uppercase and then back to lowercase. So, would it be worth while to implement a strtolower() somewhere to capture the filename extension before it's checked against the supported list?
What are your thoughts on this?
Regards David