Commit Graph
228 Commits
Author SHA1 Message Date
Leo Vasanko 4fd166b934 Use https in WebDAV examples and add Android clients
- Replace all http:// example URLs with https:// in WebDAV section
- Add Solid Explorer and CX File Explorer Android setup instructions
- Use davs:// and webdavs:// for Linux HTTPS WebDAV URLs
2026-04-26 05:18:19 +00:00
Leo Vasanko 747ae7a8d5 Document WebDAV access and compatible clients in README
- Add WebDAV Access section with client setup instructions
- Explain Basic auth and API token authentication for WebDAV
- Document Windows NTLM limitation and token-based workaround
- Fix typo: authenticatioon → authentication
2026-04-26 05:15:55 +00:00
Leo Vasanko f7ffc3f8bc Restore UA-aware auth header advertisement
Revert accidental removal of WWW-Authenticate headers.
Windows WebDAV clients receive Basic + Negotiate;
all other clients receive Basic only.
2026-04-26 05:13:37 +00:00
Leo Vasanko de78b41be4 Add token-based auth for WebDAV/NTLM and API access
- Add Token model with CRUD endpoints (/api/tokens, /auth/tokens)
- Support Basic auth with token:<secret> for built-in users
- Implement full NTLMv2 handshake for Windows WebDAV clients
- Add SSO token auth via check_permissions() proxy
- Hydrate request auth context from session or Authorization header
- Persist session cookie after successful Authorization-based login
- Add secure flag to session cookies based on request scheme
- Add frontend UserTokensModal for creating/revoking tokens
- Fix devserver to run workspace source via python -m cista
- Add tests for token CRUD and file auth (Basic, NTLM, session)
- Remove proactive WWW-Authenticate advertisement
2026-04-26 04:58:46 +00:00
Leo Vasanko d1faedc011 WebDAV support! 2026-04-25 18:20:55 +00:00
Leo Vasanko 410a8a7568 Replace WebSocket control API with REST file operations
- Add cista/fileserver.py: REST blueprint at /files with PUT upload,
  DELETE, MKCOL, POST cp/mv (combined), GET/HEAD static serving
- Remove WS control handler and all ControlBase/Cmd protocol types
- Frontend: SelectionToolbar, FileExplorer, Gallery now POST to /files
  instead of opening a control WebSocket per operation
- Remove controlUrl export from WS.ts
- Add tests: REST API, static streaming, path/escaping security
- Catch ValueError from filename.sanitize and return 400 Bad Request
2026-04-25 17:26:08 +00:00
LeoVasanko 91e07d61b6 Uploads by PUT range requests rather than WS, remove dead code WS handlers (#9)
Increases block size to 16 MiB and adjusts progress display to work smoothly with that. Also removes download WS that was already unused. Provides faster upload speed than over WS.

Reviewed-on: #9
2026-04-25 03:55:52 +01:00
Leo Vasanko a88a22571a Remove CISTA_PIL and Pillow preview mode 2026-04-25 02:06:40 +00:00
Leo Vasanko d58748439a Adjust emoji log spacing 2026-04-25 02:05:20 +00:00
Leo Vasanko c51701c252 Improve preview worker error propagation and logging 2026-04-25 01:51:49 +00:00
Leo Vasanko 88a032acfe Preview: add pdf+pyvips encode path and simplify timings 2026-04-25 00:20:19 +00:00
Leo Vasanko bbb73be07e Preview: simplify pyvips timing to single processing ms + req total. 2026-04-25 00:06:35 +00:00
Leo Vasanko 48112dec26 Frontend: don't show img preview for video/audio/doc files
- MediaPreview.vue: only render <img> for non-video, non-audio items
  (video/audio already have their own player containers)
- Document.ts: limit previewurl to previewable files (was checking only .complete)
2026-04-24 23:54:02 +00:00
Leo Vasanko fc2f357470 Preview: persistent worker pool, fast AVIF encode, access-log timing
- Add preview_worker.py: long-lived subprocess; JSONL request / framed binary
  response protocol (BLAKE3 checksum + LE uint32 sizes + msgspec JSON + payload)
- Add _PreviewWorkerPool: asyncio queue-based pool; kill+replace workers on timeout,
  checksum error, or protocol error; PREVIEW_TIMEOUT=3s, PREVIEW_WORKERS=cpu-scaled
- Use pyvips effort=0,strip=True for fast AVIF thumbnails; CISTA_PIL=1 env forces Pillow
- Report load/process/save ms in PreviewResponse; inject into access log via req.ctx._log_extra
- Wire start/shutdown_preview_workers into Sanic lifecycle hooks (app.py)
- Call configure_main_logging() after Sanic() to install emoji formatter
- Silence worker stderr (DEVNULL)
2026-04-24 23:53:23 +00:00
Leo Vasanko e579dbc61f Logging: emoji formatter and access-log extra field 2026-04-24 23:52:34 +00:00
Leo Vasanko 3e337bf1f2 Use client IP (potentially proxied) in logs, handle [ipv6]. 2026-04-24 20:13:11 +00:00
Leo Vasanko 522dd49f3f Avoid useless check. 2026-04-24 00:04:58 +00:00
Leo Vasanko 53b3835ba2 Upload end of file first for large files (for preview to function). 2026-04-24 00:02:17 +00:00
Leo Vasanko bb25d8db74 Avoid showing previews while file upload is in progress or the file is incomplete. This avoids 500 errors on server trying to generate the preview. 2026-04-23 19:34:16 +00:00
Leo Vasanko 7b3252c588 Handle missing preview files with silent 404 2026-04-23 19:02:54 +00:00
Leo Vasanko 4626f1cdff Add cleaner access logging for HTTP requests and WebSockets 2026-04-23 18:06:22 +00:00
Leo Vasanko a2e2cccebe Don't show broken media previews during uploads, instead show a spinner indicating completion. 2026-04-23 17:40:03 +00:00
Leo Vasanko 1795506090 Faster image previews by pyvips. 2026-04-23 17:19:24 +00:00
Leo Vasanko 314422c96c Allow duplicate selected entries of the same name from different paths. 2026-04-23 17:01:03 +00:00
Leo Vasanko e490cbe0fe Set avif=1 flag for SVT-AV1 when encoding a single image, for increased efficiency and less memory usage. 2026-04-23 16:57:27 +00:00
Leo Vasanko 2c74779102 Consistent forwarding of host/origin/ua over HTTP and WS to Paskia. 2026-02-10 23:56:42 +00:00
Leo Vasanko b65404beba Cleanup 2026-02-10 23:52:07 +00:00
Leo Vasanko 4aef6c73d2 pytest deps, remove unused test group. 2026-02-10 23:46:44 +00:00
Leo Vasanko 67d1fa65fb Cleaner WebSocket/Paskia proxying. 2026-02-10 23:42:13 +00:00
Leo Vasanko 6b009dea40 Attempt to get allocated size on Windows which needs WINAPI. Fallback to file size if not possible. 2026-02-05 20:31:46 +00:00
Leo Vasanko ad224dd97d Fix vite argument passing on deno (fastapi-vue-setup upstream). 2026-02-05 20:13:03 +00:00
Leo Vasanko 7b19739875 Fix --listen docopt parsing (only -l was working). 2026-02-05 20:01:26 +00:00
Leo Vasanko 362a9f47c9 Remove invalid Sanic kwarg when binding to all interfaces (not needed anyway). 2026-02-05 19:56:54 +00:00
Leo Vasanko 7b3a39a58e Better proxy header processing, pass original user-agent without httpx overriding it. 2026-02-05 17:53:52 +00:00
Leo Vasanko 0b08acdcc3 Intl support for search hotkey (where US keyboard has it). 2026-02-05 00:57:42 +00:00
Leo Vasanko 298f389dad Keyboard navigation fixes (still not perfect but better). 2026-02-05 00:54:15 +00:00
Leo Vasanko a163798178 Fix search bar losing focus under specific conditions, mainly that when the search takes more than 50ms, causing results to be emptied, with a file priorly focused, was causing breadcrumbs to get focused. (reactivity is hard) 2026-02-05 00:07:45 +00:00
Leo Vasanko 204a308396 Pass the new allocated field through search filtering. Fixes issue where 0 allocated was reported in search results. 2026-02-04 23:55:05 +00:00
Leo Vasanko 82062d1d7a Cache previews in server RAM for much faster access (they are about 70kB each). 2026-02-04 20:56:16 +00:00
Leo Vasanko ad37a48df9 Brighter low free space colors. 2026-02-04 20:40:59 +00:00
Leo Vasanko 84d80518a6 Auth restricted endpoint is picky about the trailing slash, use it consistently. 2026-02-04 20:35:29 +00:00
Leo Vasanko e520d9361c Auth mode indication on startupbox 2026-02-04 20:24:21 +00:00
Leo Vasanko 5b4be95ace Correctly handle customized server name in admin settings dialog. 2026-02-04 20:15:56 +00:00
Leo Vasanko 69c26ff85b Space usage widget show full name if possible, allow longer names. 2026-02-04 20:12:49 +00:00
Leo Vasanko 84fcf25cc5 Rename HeaderSelected to SelectionToolbar. 2026-02-04 20:01:05 +00:00
Leo Vasanko 09ef869d7e Improved selection toolbar UX. 2026-02-04 19:57:31 +00:00
Leo Vasanko cb9652567b README 2026-02-04 19:23:48 +00:00
Leo Vasanko 4ea1982312 Make devserver script take --listen argument for vite, while forwarding other args correctly to backend 2026-02-04 19:23:34 +00:00
Leo Vasanko 1f757ef335 Consistent header and footer sizing. 2026-02-04 19:19:41 +00:00
Leo Vasanko b3df715e25 Fix free/used disk space handling. Implement file disk usage tracking. Display indicators on FileExplorer for incomplete files (sparse allocation, upload in progress). 2026-02-04 19:15:09 +00:00