O
O
Obivankinobi2017-08-14 00:04:54
1C-Bitrix
Obivankinobi, 2017-08-14 00:04:54

How to update a detailed picture in the Bitrix infoblock?

Good evening.
There was a problem when trying to overwrite the detailed image of an infoblock element. When you create a new element, everything works, but when you edit it, it does not change. I tried to add 'del' = "Y" and 'old_file' = "" to the end of the array, but all in vain..

$arLoadProductArray = Array(
      "MODIFIED_BY"    => $USER->GetID(), 
      "IBLOCK_SECTION" => false,     
      "NAME"           => $_REQUEST["40"],
      "DETAIL_PICTURE" => CFile::MakeFileArray(1583),
      );

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Gritsuk, 2017-08-14
@winer

CFile::MakeFileArray($pathToFile) does not take a number, but the path to the file. For example something like this:
CFile::MakeFileArray($_SERVER["DOCUMENT_ROOT"]."/image.gif");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question