M
M
matveyboyko2018-12-12 11:25:56
Bitrix24
matveyboyko, 2018-12-12 11:25:56

Why is the wrong file attached to the task in Bitrix24?

Uploading a file:

$file = CFile::MakeFileArray(
    $link,
    false,
    false,
    ''
);
$fileSave = CFile::SaveFile(
    $file,
    '/telegram',
    false,
    false
);

I get the ID of the uploaded file: I
$FILE_ID = $fileSave;
attach it to the task:
CModule::IncludeModule('tasks');
$oTaskItem = new CTaskItem(272794, 1433);
$rs = $oTaskItem->Update(
    array(
        "UF_TASK_WEBDAV_FILES" => array("$FILE_ID")
    ),
    array(
        "USER_ID" => 1433,
        "CHECK_RIGHTS_ON_FILES" => false
    )
);

But something incomprehensible is attached:
5c10c5debcde3296516427.png
What could be wrong?
It seems that the file is attached with the wrong ID.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question