29 "video/mp4" =>
"video/mp4",
30 "audio/mpeg" =>
"audio/mpeg",
31 "image/jpeg" =>
"image/jpeg",
32 "image/png" =>
"image/png",
33 "image/gif" =>
"image/gif",
34 "image/svg+xml" =>
"image/svg+xml" 53 if (self::$instance) {
54 return self::$instance;
61 $this->purposeSuffixes = $purpose_filetypes;
76 $this->defaultAccess = $value ===
"users" ?
"users" :
"public";
91 $this->video_threshold = $a_val;
99 public function save(): void
101 foreach ($this->purposeSuffixes as $purpose => $filetypes) {
102 $this->storage->set($purpose .
"_types", implode(
",", $filetypes));
104 $this->storage->set(
"defaultaccess", $this->defaultAccess);
105 $this->storage->set(
"video_threshold", $this->video_threshold);
106 $this->storage->set(
"mimetypes", implode(
",", $this->
getMimeTypes()));
111 foreach ($this->purposeSuffixes as $purpose => $filetypes) {
112 if ($this->storage->get($purpose .
"_types") !=
false) {
113 $sf = explode(
",", $this->storage->get($purpose .
"_types"));
114 $sf = array_filter($sf,
function (
$c) {
115 return in_array(
$c, $this->supported_suffixes);
117 $this->purposeSuffixes[$purpose] = $sf;
122 if ($this->storage->get(
"mimetypes")) {
123 $mt = explode(
",", $this->storage->get(
"mimetypes"));
124 $mt = array_filter($mt,
function (
$c) {
125 return in_array(
$c, $this->supported_mime_types);
139 $mimeTypes = array_unique(array_values(MimeType::getExt2MimeMap()));
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...