Skip to content
Snippets Groups Projects
Commit a6ee4a5b authored by dre0059's avatar dre0059
Browse files

Oprava - upload.html pomocou local history

parent d6a36313
No related merge requests found
......@@ -19,12 +19,6 @@
<h1>Upload your PDF</h1>
<!-- formular na nahravanie PDF -->
<<<<<<< HEAD
<form action="/api/grobid/upload" method="post" id = "uploadForm" enctype = "multipart/form-data">
<label for="fileInput">Choose PDF file:</label>
<input type = "file" id = "fileInput" name = "file" accept="application/pdf">
=======
<form action="/api/grobid/upload" method="post" id = "uploadForm" enctype = "multipart/form-data">
<label for="fileInput">Choose PDF file:</label>
<input type = "file" id = "fileInput" name = "file" accept="application/pdf">
......@@ -36,7 +30,6 @@
<option value="1.6 Biological sciences">1.6 Biological sciences</option>
</select>
>>>>>>> 9e1c76c (Categories of PDF initialized)
<button type = "submit">Upload & Process the PDF</button>
</form>
......@@ -51,11 +44,8 @@
<pre id = "json-output"></pre>
</div>
<<<<<<< HEAD
=======
<!--<a href="/api/document/22">click here</a> -->
>>>>>>> 9e1c76c (Categories of PDF initialized)
<!-- .js na zobrazenie PDF -->
<script>
document.getElementById('fileInput').addEventListener('change', function(event){
......@@ -73,10 +63,7 @@
$('#uploadForm').submit(function(event) {
event.preventDefault();
const fileInput = $('#fileInput')[0].files[0];
<<<<<<< HEAD
=======
const category = $('#category').val(); // Získanie vybranej kategórie
>>>>>>> 9e1c76c (Categories of PDF initialized)
if(!fileInput){
alert("Please select a PDF file first.");
......@@ -85,10 +72,7 @@
const formData = new FormData();
formData.append("file", fileInput);
<<<<<<< HEAD
=======
formData.append("category", category); // Posielame aj kategóriu
>>>>>>> 9e1c76c (Categories of PDF initialized)
$.ajax({
url: "/api/grobid/upload",
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment