90 lines
3.3 KiB
HTML
90 lines
3.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Ingest</title>
|
|
<link rel="stylesheet" href="/static/app.css">
|
|
</head>
|
|
<body>
|
|
<div class="app-shell" id="app-shell">
|
|
{% include "partials/sidebar.html" %}
|
|
|
|
<main class="main">
|
|
<div class="topbar">
|
|
<div>
|
|
<h1 class="page-title">Ingest</h1>
|
|
<p class="page-subtitle">Upload files or ingest from server-side paths.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h2 class="card-title">Upload files</h2>
|
|
<form method="post" action="/ingest/upload-files" enctype="multipart/form-data">
|
|
<div class="form-field full">
|
|
<label>Select file(s)</label>
|
|
<input type="file" name="uploaded_files" multiple required>
|
|
</div>
|
|
<div class="button-row" style="margin-top: 1rem;">
|
|
<button class="primary" type="submit">Upload and ingest</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h2 class="card-title">Server-side ingest</h2>
|
|
|
|
<form method="post" action="/ingest/server-file" style="margin-bottom: 1.25rem;">
|
|
<div class="form-field full">
|
|
<label>Ingest one server file</label>
|
|
<input type="text" name="file_path" placeholder="/mnt/storage/.../file.pdf" required>
|
|
</div>
|
|
<div class="button-row" style="margin-top: 1rem;">
|
|
<button type="submit">Ingest file</button>
|
|
</div>
|
|
</form>
|
|
|
|
<form method="post" action="/ingest/server-directory" style="margin-bottom: 1.25rem;">
|
|
<div class="form-field full">
|
|
<label>Ingest one server directory</label>
|
|
<input type="text" name="directory_path" placeholder="/mnt/storage/.../incoming" required>
|
|
</div>
|
|
<div class="form-field">
|
|
<label><input type="checkbox" name="recursive" value="1"> Recursive</label>
|
|
</div>
|
|
<div class="button-row" style="margin-top: 1rem;">
|
|
<button type="submit">Ingest directory</button>
|
|
</div>
|
|
</form>
|
|
|
|
<form method="post" action="/ingest/inbox">
|
|
<div class="form-field full">
|
|
<label>Inbox root</label>
|
|
<input type="text" value="{{ inbox_root }}" readonly>
|
|
</div>
|
|
<div class="button-row" style="margin-top: 1rem;">
|
|
<button type="submit">Ingest inbox</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
|
|
<script>
|
|
(function () {
|
|
const appShell = document.getElementById("app-shell");
|
|
const menuToggle = document.getElementById("menu-toggle");
|
|
if (!appShell || !menuToggle) return;
|
|
menuToggle.addEventListener("click", function () {
|
|
appShell.classList.toggle("nav-open");
|
|
});
|
|
menuToggle.addEventListener("keydown", function (e) {
|
|
if (e.key === "Enter" || e.key === " ") {
|
|
e.preventDefault();
|
|
appShell.classList.toggle("nav-open");
|
|
}
|
|
});
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html>
|