У меня есть эта форма, и она проста html и css. Как отправить многочастный запрос? Мне нужно отправить это на мой API.
В почтальоне, мой API принимает данные формы в теле в этом формате.
company -enter a string here
excelFile - enter excel file here
plan_type-enter a string here
Мне нужно добавить две другие компании ahd plan_type из моего локального хранилища. Меня беспокоит то, как взять файл из этой формы и отправить запросы API.
<form name=”myForm” enctype=”multipart/form-data”>
<div class="row pt-2 pl-3">
<div class="col-md-5 p-0">
<a href="assets/exl/company-employee-email-ID.xlsx" target="_blank"> <img src="assets/images/Policy-doc-without.jpg" style="width: 200px; float: left; height: 80px;box-shadow: 0 3px 6px 0 rgba(0, 150, 11, 0.16);" /></a>
</div>
<div class="col-md-5 pl-0 position-relative bg-upload-file">
<input type="file" name="file" class="input-file">
</div>
</div>
<div class="pt-5 text-left pb-4">
<button class="button--light btn-next">SUBMIT</button>
</div>
</form>