diff --git a/files/classes/external/stored_file_exporter.php b/files/classes/external/stored_file_exporter.php index 1cc24061c85aa..c491170e971ed 100644 --- a/files/classes/external/stored_file_exporter.php +++ b/files/classes/external/stored_file_exporter.php @@ -54,6 +54,7 @@ public function __construct(stored_file $file, $related = array()) { $data->filepath = $file->get_filepath(); $data->filename = $file->get_filename(); $data->isdir = $file->is_directory(); + $data->isimage = $file->is_valid_image(); $data->timemodified = $file->get_timemodified(); $data->timecreated = $file->get_timecreated(); $data->filesize = $file->get_filesize(); @@ -94,6 +95,9 @@ protected static function define_properties() { 'isdir' => array( 'type' => PARAM_BOOL ), + 'isimage' => array( + 'type' => PARAM_BOOL + ), 'timemodified' => array( 'type' => PARAM_INT ),