Merge branch 'ent-12938-File-manager-no-funciona-correctamente' into 'develop'
Ent 12938 file manager no funciona correctamente See merge request artica/pandorafms!6967
This commit is contained in:
commit
cf517cd963
|
@ -151,8 +151,13 @@ function upload_file($upload_file_or_zip, $default_real_directory, $destination_
|
|||
// Copy file to directory and change name.
|
||||
$nombre_archivo = sprintf('%s/%s', $real_directory, $filename);
|
||||
try {
|
||||
$ext = strtolower(pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION));
|
||||
if (empty($filterFilesType) === true || in_array($ext, $filterFilesType) === true) {
|
||||
if (isset($_FILES['file']['type']) === true && empty($_FILES['file']['type']) === false) {
|
||||
$type = $_FILES['file']['type'];
|
||||
} else {
|
||||
$type = strtolower(pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION));
|
||||
}
|
||||
|
||||
if (empty($filterFilesType) === true || in_array($type, $filterFilesType) === true) {
|
||||
$result = copy($_FILES['file']['tmp_name'], $nombre_archivo);
|
||||
} else {
|
||||
$types_allowed = implode(', ', $filterFilesType);
|
||||
|
|
Loading…
Reference in New Issue