HEIC:
- lib/image.js — openImage(): HEIC (HEVC) через heic-decode (libheif WASM), т.к. sharp
декодирует только AV1-HEIF; непрозрачная альфа отбрасывается
- compress: общий encodeImage(); формат «оригинала» по содержимому (metadata), а не по MIME;
HEIC/BMP в режиме «Оригинал» → JPEG с расширением .jpg
Картинки → PDF (/pdf):
- /pdf/fromImages переписан: любые форматы вкл. HEIC, порядок/повторы/поворот страниц,
размер листа (по картинке/A4/A3/A5/Letter), ориентация, поля, качество, имя файла;
повторы встраиваются один раз; нетронутые JPEG/PNG — байт-в-байт
- /pdf/thumb — серверные миниатюры для HEIC/TIFF (свой мягкий лимитер)
- UI-конструктор: сетка с превью, drag&drop, сортировка, массовый поворот, прогресс загрузки
- старая вкладка была нерабочей (поле files вместо images) и требовала загрузки PDF
- SVG не принимается (librsvg + внешние ссылки)
- фикс: потерянная обёртка panel-watermark ломала вложенность stepConfig
- фикс: pdfIcon недоступен из inline onerror
UI: белый фон (--surface-800) у зон загрузки, неактивных табов, опций и карточек
(compress, pdf, video, converter, formatter, sanitizer, parser)
Незакоммиченная работа сессии 2026-09-05 (уже на проде):
- lib/owner.js — реестр владельцев файлов-результатов, owner-check во всех download-роутах (IDOR)
- lib/limits.js — createLimiter(): skip для админа, ipKeyGenerator (фикс ERR_ERL_KEY_GEN_IPV6)
- video: обработчики 'error' у ffmpeg/ffprobe (spawn ENOENT больше не роняет сервер), таймауты
- pdf: runGhostscript/gsUnavailable, водяной знак с кириллицей (fontkit + TTF)
- снятие лимитов размера/количества для админа в pdf/video
- журнал сессии docs/sessions/2026-09-05-0231.md
- Compress panel now has format buttons before quality
- Backend uses selected format for compress output
- Format sent in API body for compress mode
- User can compress + convert format in one step
- Two multer instances: uploadUser (200MB) and uploadAdmin (1GB)
- uploadMiddleware checks session role before picking handler
- Error message shows correct limit per role
- GET /pdf/preview/:fileId — renders first page as PNG (72 DPI)
- GET /pdf/preview/:fileId/:page — specific page preview
- GET /pdf/thumbnails/:fileId — list of all page preview URLs
- File cards show actual PDF thumbnail instead of icon
- Cached previews (30 min cleanup)
- Fallback to PDF icon if preview fails
- Fix multer encoding: decode Latin-1 to UTF-8 for Cyrillic names
- Use pdf-lib instead of pdf-parse for page count (more reliable)
- ignoreEncryption flag for encrypted PDFs
- 15 API endpoints for PDF operations (pdf-lib, pdf-parse, Ghostscript)
- Frontend with 8 operation tabs
- Merge multiple PDFs, split by page ranges
- Rotate/delete/reorder pages
- Add watermark text, page numbers
- Compress via Ghostscript (screen/ebook/printer quality)
- PDF to PNG/JPG, Images to PDF
- Password protection, text extraction
- Added to sidebar, dashboard (Utils category), DB
- Parse time= from each stderr chunk (not accumulated buffer)
- Add -progress pipe:2 flag for frequent progress output
- Support both time= and out_time= formats
- Progress only increases (no jumps back)
- /convert now returns immediately, ffmpeg runs in background
- Client polls /progress every second for live progress %
- Progress endpoint returns downloadUrl/outputSize when done
- UI shows real-time percentage during conversion
- AdminJS at /admin with auth (admin role only)
- Manage: users, categories, tools, content blocks, settings
- DB tables: settings, categories, tools, content_blocks
- Users table: added role (user/admin) and is_blocked fields
- API: /api/settings, /api/tools, /api/content/:section
- Sidebar: admin link visible only for admin users
- Removed /logs from public routes (now in AdminJS)
- Video converter: fixed ffmpeg codecs for RPi5 (h264_v4l2m2m)
- Dependencies: sequelize, @adminjs/sequelize, mariadb