Phase 4: upload, LLM extraction, import review flow
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
{{define "content"}}
|
||||
<div class="max-w-lg">
|
||||
<h1 class="text-2xl font-bold text-gray-800 mb-1">Upload Document</h1>
|
||||
<p class="text-sm text-gray-500 mb-6">Accepts PDF or DOCX. Max 20 MB.</p>
|
||||
|
||||
{{if .Error}}
|
||||
<div class="mb-5 text-sm text-red-700 bg-red-50 border border-red-200 px-4 py-3 rounded-md">
|
||||
{{.Error}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<form method="post" action="/upload" enctype="multipart/form-data" class="space-y-5">
|
||||
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
|
||||
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700 mb-1">File</label>
|
||||
<input type="file" name="file" accept=".pdf,.docx" required
|
||||
class="block w-full text-sm text-gray-700
|
||||
file:mr-3 file:py-2 file:px-4
|
||||
file:rounded-md file:border-0
|
||||
file:text-sm file:font-medium
|
||||
file:bg-blue-50 file:text-blue-700
|
||||
hover:file:bg-blue-100">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700 mb-1">
|
||||
Source name <span class="text-gray-400 font-normal">(optional — defaults to filename)</span>
|
||||
</label>
|
||||
<input type="text" name="source" placeholder="e.g. Chapter 3"
|
||||
class="w-full border border-gray-300 rounded-md px-3 py-2 text-sm shadow-sm
|
||||
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
||||
</div>
|
||||
|
||||
<button type="submit"
|
||||
class="w-full bg-blue-600 hover:bg-blue-700 text-white py-2.5 px-4 rounded-md
|
||||
text-sm font-semibold shadow-sm">
|
||||
Extract questions
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user