Bitrix Site Manager

CPosting::DeleteFile

CPosting::DeleteFile(
    int ID,
    int file_id = false
);

The method DeleteFile deletes one or all attachments of the issue.

Parameters

ParameterDescription
ID The issue ID.
file_id The attachment ID. If omitted or false, all attachments are deleted.

Return Values

No return value.

Example



    if(is_array($FILE_ID))
        foreach($FILE_ID as $file_id)
            CPosting::DeleteFile($ID, $file_id);