MDL-64820 external: add isimage to stored_file exporter

This commit is contained in:
Ryan Wyllie 2019-03-08 14:18:24 +08:00
parent 432cdac4bd
commit a307a47651

View File

@ -54,6 +54,7 @@ class stored_file_exporter extends \core\external\exporter {
$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 @@ class stored_file_exporter extends \core\external\exporter {
'isdir' => array(
'type' => PARAM_BOOL
),
'isimage' => array(
'type' => PARAM_BOOL
),
'timemodified' => array(
'type' => PARAM_INT
),