[1] => 747
[1_descr] => 1
[2] => 748
[2_descr] => 2
[0] => 746
[0_del] => Y
[PROPERTY_FILE_42] => Array
(
[0] => Array
(
[name] => favicon-16x16.png
[type] => image/png
[tmp_name] => /BXTEMP-2020-01-31/05/bxu/main/7a9584ea376383cf77400b59a50a1ec6/file1580387527625/default
[size] => 3369
[error] =>
)
[1] => Array
(
[name] => favicon-32x32.png
[type] => image/png
[tmp_name] => /BXTEMP-2020-01-31/05/bxu/main/7a9584ea376383cf77400b59a50a1ec6/file1580387076250/default
[size] => 3931
[error] =>
)
)
[PROPERTY_FILE_42_descr] => Array
(
[0] => 1
[1] => 2
)
case "F":
echo "<br>";
if($arResult["PROPERTY_LIST_FULL"][$propertyID]["MULTIPLE"] == "Y")
{
$name = 'PROPERTY_FILE_'.$propertyID.'_'.($arResult["ELEMENT_PROPERTIES"][$propertyID][$i]["VALUE_ID"] ? $arResult["ELEMENT_PROPERTIES"][$propertyID][$i]["VALUE_ID"] : $i);
$value = intval($propertyID) > 0 ? $arResult["ELEMENT_PROPERTIES"][$propertyID][$i]["VALUE"] : $arResult["ELEMENT"][$propertyID];
echo \Bitrix\Main\UI\FileInput::createInstance(array(
"name" => $name,
"description" => true,
"upload" => true,
"allowUpload" => "I",
"medialib" => true,
"fileDialog" => true,
"cloud" => true,
"delete" => true,
"maxCount" => 10
))->show(
$value,
$value ? true : false
);
} else {
for ($i = 0; $i<$inputNum; $i++)
{
$name = 'PROPERTY_FILE_'.$propertyID.'_'.($arResult["ELEMENT_PROPERTIES"][$propertyID][$i]["VALUE_ID"] ? $arResult["ELEMENT_PROPERTIES"][$propertyID][$i]["VALUE_ID"] : $i);
$value = intval($propertyID) > 0 ? $arResult["ELEMENT_PROPERTIES"][$propertyID][$i]["VALUE"] : $arResult["ELEMENT"][$propertyID];
echo \Bitrix\Main\UI\FileInput::createInstance(array(
"name" => $name,
"description" => true,
"upload" => true,
"allowUpload" => "I",
"medialib" => true,
"fileDialog" => true,
"cloud" => true,
"delete" => true,
"maxCount" => 1
))->show(
$value,
$value ? true : false
);
}
}
break;
$arUpdatePropertyValues[$propertyID] = array();
foreach ($arPropertyValue as $key => $value)
{
$arFile = $_FILES["PROPERTY_FILE_".$propertyID."_".$key];
$arFile["del"] = $_REQUEST["DELETE_FILE"][$propertyID][$key] == "Y" ? "Y" : "";
$arUpdatePropertyValues[$propertyID][$key] = $arFile;
if(($arParams["MAX_FILE_SIZE"] > 0) && ($arFile["size"] > $arParams["MAX_FILE_SIZE"]))
$arResult["ERRORS"][] = GetMessage("IBLOCK_ERROR_FILE_TOO_LARGE");
}
$arFile = ($_FILES["PROPERTY_FILE_".$propertyID."_0"] ? $_FILES["PROPERTY_FILE_".$propertyID."_0"] : CIBlock::makeFileArray($_REQUEST["PROPERTY_FILE_".$propertyID."_0"]));
$arFile["del"] = $_REQUEST["PROPERTY_FILE_".$propertyID."_0_del"] == "Y" ? "Y" : "";
$arFile["description"] = $_REQUEST["PROPERTY_FILE_".$propertyID."_0_descr"];
$arUpdateValues[$propertyID] = $arFile;