4include_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))
An exception for terminatinating execution or to throw for unit testing.
Abstract parent class for all file preview renderer classes.
supports($preview)
Determines whether the specified preview object is supported by the renderer.
getSupportedRepositoryTypes()
Gets an array containing the repository types (e.g.
prepareFileForExec($filepath)
Checks whether the specified file path can be used with exec() commands.
getSupportedFileFormats()
Gets an array containing the file formats that are supported by the renderer.
static _getFileExtension($a_file_name)
Gets the file extension of the specified file name.
static _lookupFileName($a_id)
Abstract parent class for all preview renderer classes.
static ilTempnam($a_temp_path=null)
Create a temporary file in an ILIAS writable directory.