v2.0.13: этап 3 — выбор папок + рекурсивный клиентский ZIP
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:
“Naeel”
2026-08-26 08:40:19 +03:00
parent c2344f9738
commit d2894ad7c5
5 changed files with 66 additions and 6 deletions
+14
View File
@@ -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');