4 include_once(
"./Services/Preview/classes/class.ilPreviewRenderer.php");
39 require_once(
"./Modules/File/classes/class.ilObjFile.php");
40 include_once
'./Modules/File/classes/class.ilObjFileAccess.php';
42 if (isset($_FILES[
'file'][
'name']))
46 elseif (isset($_FILES[
'upload_files'][
'name']))
48 $filename = $_FILES[
'upload_files'][
'name'];
70 $pos = strrpos($filepath,
"/");
71 $name = $pos !==
false ? substr($filepath, $pos + 1) : $filepath;
75 $normName = preg_replace(
"/[^A-Za-z0-9.\- +_&]/",
"", $name);
76 if ($normName != $name)
79 if (copy($filepath, $tempPath))
prepareFileForExec($filepath)
Checks whether the specified file path can be used with exec() commands.
Abstract parent class for all file preview renderer classes.
static _getFileExtension($a_file_name)
Gets the file extension of the specified file name.
Abstract parent class for all preview renderer classes.
getSupportedFileFormats()
Gets an array containing the file formats that are supported by the renderer.
static _lookupFileName($a_id)
supports($preview)
Determines whether the specified preview object is supported by the renderer.
getSupportedRepositoryTypes()
Gets an array containing the repository types (e.g.
Create styles array
The data for the language used.
static ilTempnam($a_temp_path=null)
Create a temporary file in an ILIAS writable directory.