v2.0.13: этап 3 — выбор папок + рекурсивный клиентский ZIP
Deploy contracts-flask / validate (push) Canceled after 0s
Deploy contracts-flask / validate (push) Canceled after 0s
- pages_bp: route /upload/<path> отдаёт ES-модули upload/frontend - index.html: инпут папки (webkitdirectory) + мост listZipFiles - files.js: expandZipClient (рекурсивный ZIP через drhider listZipFiles) - app.js: обработчик выбора папки (фильтр .pdf/.doc/.docx/.zip)
This commit is contained in:
@@ -116,6 +116,20 @@ fileInput.addEventListener('change', async function() {
|
||||
onFilesSelected(newFiles);
|
||||
});
|
||||
|
||||
// Выбор папки (webkitdirectory) — та же обработка, что и файлы
|
||||
var folderInput = document.getElementById('folderInput');
|
||||
var folderBtn = document.getElementById('folderBtn');
|
||||
if (folderBtn && folderInput) {
|
||||
folderBtn.addEventListener('click', function() { folderInput.click(); });
|
||||
folderInput.addEventListener('change', function() {
|
||||
var files = Array.from(folderInput.files).filter(function(f) {
|
||||
var n = f.name.toLowerCase();
|
||||
return n.endsWith('.pdf') || n.endsWith('.doc') || n.endsWith('.docx') || n.endsWith('.zip');
|
||||
});
|
||||
if (files.length) onFilesSelected(files);
|
||||
});
|
||||
}
|
||||
|
||||
// ── Классификация ──────────────────────────────────────────
|
||||
function showClassifyBtn() {
|
||||
var btn = document.getElementById('classifyBtn');
|
||||
|
||||
Reference in New Issue
Block a user