Answer the question
In order to leave comments, you need to log in
Filling in a multiple property of the File type in infoblocks?
There is a form with a file selection field:
<input type="file" data-not-required name="file" multiple title="Изображения">
\CModule::IncludeModule("iblock");
$el = new \CIBlockElement;
if ($review_id = $el->Add( [
'IBLOCK_SECTION_ID' => false,
'IBLOCK_ID' => IBLOCK_content_reviews,
'PROPERTY_VALUES' => [
"PICTURES" => $FILES['file'],
],
'NAME' => 'test',
'ACTIVE' => 'N',
]))
\AddMessage2Log(print_r($FILES['file'], true));
Date: 2021-04-07 15:21:46
Module:
Array
(
[name] => Screenshot_1.png
[type] => image/png
[tmp_name] => /tmp/phpy1UseU
[error] => 0
[size] => 349258
)
array(5) {
["name"]=>
string(27) "Без названия.png"
["type"]=>
string(9) "image/png"
["tmp_name"]=>
string(14) "/tmp/phpvX9khO"
["error"]=>
int(0)
["size"]=>
int(7308)
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question