Spaces:
Sleeping
Sleeping
Commit History
-
Use lightweight cached u2netp rembg session for background-removal tools
remove-background / transparent-background / replace-background loaded rembg's default u2net model (~176MB) on every call, which was crash-looping the Celery worker on the constrained HF free tier — jobs sat stuck in "queued" and never ran. Switch to the lightweight u2netp model (~4.7MB) via a single module-cached session shared across the three workers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>c263a50 -
Fix qr-pdf field mismatch + add pandoc for word-to-txt/html/markdown
- qr_pdf endpoint read payload.text (AttributeError -> HTTP 500 on create) and stored options["text"], but the schema field is `url` and the worker reads options["url"]. Use payload.url and store "url". - Dockerfile: install pandoc — word-to-txt/html/markdown workers shell out to it and were failing with "No such file or directory: 'pandoc'". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>8dc56de -
Fix systemic tool breakage: sign worker-side Cloudinary fetch + fail-fast jobs
- file_downloader.download_file: sign Cloudinary URLs (private_download_url) before fetching — raw delivery URLs are ACL-blocked (HTTP 401), which was failing the input download for every job-based tool. - conversion_helpers.start_file_job: mark the job failed on download/file error instead of leaving the caller's job=None (which no-op'd fail_job and hung the row in "processing" forever — the 95% UI hang). - jobs.get_job_status: include error_message when status=="failed" so failed jobs are debuggable from the API. - sign tool frontend: gate submit on non-empty typed signature / stamp image / certificate so empty fields don't 400 at the backend. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>3652f05 -
Phase B: no-login backend — anonymous tool usage with secure downloads
- Add get_current_user_optional (auto_error=False) — anonymous requests no longer 401 - Job.public_token (auto-generated UUID, unique+indexed) for download/status auth - jobs.py: token-based authorization (_authorize_job) so anonymous jobs can't be fetched by enumerating sequential ids; logged-in owner path unchanged - tool_helpers + files.py: nullable user_id; logged-in users match own rows, anonymous match unowned (NULL) rows - Sweep 66 tool endpoints (25 helper-based, 41 inline) to optional auth; admin/auth keep hard auth - Alembic migration b7e1c2a4f9d0 adds jobs.public_token Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>9eb04b1 -
Sign Cloudinary download_url in job status response
Frontend opens status.download_url directly, but it was the raw delivery URL (ACL-blocked → "Failed to load PDF"). Sign it with private_download_url so the browser can download it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>a4b6de7 -
Add filezkit.tiesverse.com to CORS allowed origins
Crs-Lionel +1: Claude Sonnet 4.6Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>2b329c8 -
Phase 7: lock CORS to Vercel domain, update docs
Crs-Lionel +1: Claude Sonnet 4.6Replaces wildcard CORS origin with explicit allowlist: filezkit.vercel.app, preview deploy URL, localhost:3000. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>2849e22 -
Switch to private_download_url to bypass Cloudinary ACL
Crs-Lionel +1: Claude Sonnet 4.6Delivery-signed URLs (s--sig--) satisfy strict transformations but not ACL restrictions (x-cld-error: deny or ACL failure). private_download_url uses the api.cloudinary.com endpoint with api_key + HMAC auth, which bypasses account-level access control. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>8597b95 -
Use signed Cloudinary URLs for file downloads
Crs-Lionel +1: Claude Sonnet 4.6Adds signed_download_url() which generates a URL with a Cloudinary signature, satisfying accounts with strict transformations or access-control restrictions that reject plain public URLs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>be785c3 -
Strip whitespace from Cloudinary credentials at startup
Crs-Lionel +1: Claude Sonnet 4.6Defensively strips leading/trailing whitespace from env-sourced cloud_name, api_key, and api_secret to prevent auth failures caused by accidental whitespace in HF Space secrets. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>464bc00 -
Initial commit: FilezKit backend + frontend, dockerized for HF Spaces
Crs-Lionel +1: Claude Opus 4.8Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>82a25a8