33 ?
string $a_index = null,
34 ?
string $a_sub_index = null
36 $this->keepFileUpload($a_hash, $a_field, $a_tmp_name, $a_name, $a_type, $a_index, $a_sub_index);
44 ?
string $a_index = null,
45 ?
string $a_sub_index = null
47 $a_name = ilFileUtils::getAsciiFileName($a_name);
49 $tmp_file_name = implode(
57 str_replace(
"/",
"~~", $a_type),
58 str_replace(
"~~",
"_", $a_name),
65 return $temp_path . $tmp_file_name;
74 if (is_dir($temp_path)) {
75 $temp_files = glob($temp_path .
"/" . session_id() .
"~~" . $hash .
"~~*");
76 if (is_array($temp_files)) {
77 foreach ($temp_files as $full_file) {
78 $file = explode(
"~~", basename($full_file));
82 $type = $file[5] .
"/" . $file[6];
86 if (!($_FILES[$field][
"tmp_name"][$idx][$idx2] ??
false)) {
87 $_FILES[$field][
"tmp_name"][$idx][$idx2] = $full_file;
88 $_FILES[$field][
"name"][$idx][$idx2] =
$name;
89 $_FILES[$field][
"type"][$idx][$idx2] =
$type;
90 $_FILES[$field][
"error"][$idx][$idx2] = 0;
91 $_FILES[$field][
"size"][$idx][$idx2] = filesize($full_file);
95 if (!($_FILES[$field][
"tmp_name"][$idx] ??
false)) {
96 $_FILES[$field][
"tmp_name"][$idx] = $full_file;
97 $_FILES[$field][
"name"][$idx] =
$name;
98 $_FILES[$field][
"type"][$idx] =
$type;
99 $_FILES[$field][
"error"][$idx] = 0;
100 $_FILES[$field][
"size"][$idx] = filesize($full_file);
103 if (!($_FILES[$field][
"tmp_name"] ??
false)) {
104 $_FILES[$field][
"tmp_name"] = $full_file;
105 $_FILES[$field][
"name"] =
$name;
106 $_FILES[$field][
"type"] =
$type;
107 $_FILES[$field][
"error"] = 0;
108 $_FILES[$field][
"size"] = filesize($full_file);
115 throw new ilDclException(
'temp dir path "' . $temp_path .
'" is not a directory');
126 foreach ($files as $file) {
127 if (file_exists($file)) {
static getDataDir()
get data directory (outside webspace)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...