Update biz_v.html
Browse files- biz_v.html +0 -46
biz_v.html
CHANGED
|
@@ -273,17 +273,6 @@
|
|
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
-
|
| 277 |
-
<h1>Upload JSON File</h1>
|
| 278 |
-
<form id="uploadForm" onsubmit="handleFormSubmit(event)" enctype="multipart/form-data">
|
| 279 |
-
<label for="file">Select JSON file:</label>
|
| 280 |
-
<input type="file" id="file" name="file" accept=".json" required><br><br>
|
| 281 |
-
<input type="submit" value="Upload">
|
| 282 |
-
</form>
|
| 283 |
-
<div id="message" style="display:none; margin-top:20px;"></div>
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
|
| 288 |
|
| 289 |
|
|
@@ -458,41 +447,6 @@
|
|
| 458 |
|
| 459 |
|
| 460 |
|
| 461 |
-
<script>
|
| 462 |
-
function showMessage(message) {
|
| 463 |
-
var messageDiv = document.getElementById('message');
|
| 464 |
-
messageDiv.innerText = message;
|
| 465 |
-
messageDiv.style.display = 'block';
|
| 466 |
-
}
|
| 467 |
-
function handleFormSubmit(event) {
|
| 468 |
-
event.preventDefault();
|
| 469 |
-
var formData = new FormData(event.target);
|
| 470 |
-
fetch('/upload_json', {
|
| 471 |
-
method: 'POST',
|
| 472 |
-
body: formData
|
| 473 |
-
})
|
| 474 |
-
.then(response => response.json())
|
| 475 |
-
.then(data => {
|
| 476 |
-
if (data.message) {
|
| 477 |
-
showMessage(data.message);
|
| 478 |
-
} else if (data.error) {
|
| 479 |
-
showMessage(data.error);
|
| 480 |
-
}
|
| 481 |
-
})
|
| 482 |
-
.catch(error => {
|
| 483 |
-
showMessage("An error occurred: " + error);
|
| 484 |
-
});
|
| 485 |
-
}
|
| 486 |
-
</script>
|
| 487 |
-
|
| 488 |
-
|
| 489 |
-
|
| 490 |
-
|
| 491 |
-
|
| 492 |
-
|
| 493 |
-
|
| 494 |
-
|
| 495 |
-
|
| 496 |
|
| 497 |
</body>
|
| 498 |
</html>
|
|
|
|
| 273 |
|
| 274 |
|
| 275 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 276 |
|
| 277 |
|
| 278 |
|
|
|
|
| 447 |
|
| 448 |
|
| 449 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 450 |
|
| 451 |
</body>
|
| 452 |
</html>
|