1С-Битрикс
1
Вклад в тег
<form action="" method="POST">
<?foreach ($_POST["NEW_FILE_UPLOAD"] as $key => $item):?>
<?$img = htmlspecialchars($item);?>
<img src="<?=CFIle::GetPath($img)?>" width="150px">
<?endforeach?>
<?$APPLICATION->IncludeComponent("bitrix:main.file.input", "drag_n_drop",
array(
"INPUT_NAME"=>"NEW_FILE_UPLOAD",
"MULTIPLE"=>"Y",
"MODULE_ID"=>"main",
"MAX_FILE_SIZE"=>"",
"ALLOW_UPLOAD"=>"A",
"ALLOW_UPLOAD_EXT"=>"",
"INPUT_CAPTION" => "Добавить фото",
"INPUT_VALUE" => $_POST['NEW_FILE_UPLOAD']
),
false
);?>
<input class="pic" type="text" value="" id="newF">
<input type="submit" value="Отправить">
</form>
var inp = BX("newF");
BX.adjust(inp, {props: {value: result.element_id}});