void handler function( array arFile );
The "OnFileDelete" event is called after deleting a file in the method CFile::Delete. The event can be used to delete files, derived from data file (created when uploaded thumbnail image and etc.).
|arFile||Array with deleted file data, containing the following keys:
SUBDIR - subdirectory in the folder to upload files (usually in /upload);
FILE_NAME - deleted file name.
Examples of use
AddEventHandler("main", "OnFileDelete", "MyOnFileDelete");
public static function MyOnFileDelete($arFile)
$fname = $_SERVER["DOCUMENT_ROOT"]."/upload/resize/".$arFile["SUBDIR"]."/small_".$arFile["FILE_NAME"];
© «Bitrix24», 2001-2023