Media: wire PDF upload to the page converter (signage #15b) #104
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage#104
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
POST /api/v1/mediarefuses anyapplication/pdfupload withunsupported_media_type—crates/server/src/media/handlers.rs::pdf_not_yet_supported,called from
upload_mediawheneverclassify()returns"document". Thepage-image converter itself landed on GRI-1868 (
crates/server/src/pdf.rs,this repo's closed issue #15), but nothing in the upload path calls it yet.
handlers.rs's own comment names this gap as "signage #15b", which was neverfiled.
plan/server/rest-api.md's own "Media" table already documents the finishedbehaviour ("A PDF is paged into one
document_pageentry per page at uploadtime") — the plan is ahead of the code here, not wrong.
Why it matters now
#28's deployment note names "web page URL and PDF" as the two must-have
content types a campus needs on day one. The URL path (
POST /media/url)works end-to-end today; PDF does not — a real upload is refused with a 400
before it ever reaches
pdf.rs. The note can show the product owner how toput a web page on a screen and cannot show the same for a PDF, which is half
of its "done when": the note usable alone.
Done when
A PDF uploaded through
POST /api/v1/mediais split into page images viapdf.rs, onemediarow per page withpdf_pagesset on the original (theshape
handlers.rs's comment andrest-api.mdalready describe), and adocument_pageplaylist item can reference a page.Depends on
Nothing new —
pdf.rs(issue #15, closed) already does the conversion; thisis purely the wiring between
upload_mediaand that converter.Blocks
#28 (deployment note: one server behind a reverse proxy, many campuses) —
the note cannot document a must-have content type the server refuses.
PR #106 opened: #106
upload_medianow wires PDFs topdf.rs(signage #15a): onemediarow per page (kind = "document_page"), the original getspdf_pagesset, migration0003widensmedia_kind_checkto allow it. A PDF the converter can't parse leaves no catalog entry (AC-3-06, still green).Replaced
media_integration.rs'sa_pdf_upload_is_refused_until_the_converter_is_wired_in(written alongside the stub on GRI-1874) withan_unparseable_pdf_upload_is_refused— the old assertion (every PDF refused withunsupported_media_type) is precisely what this issue removes. Did not touch any Test Writer-owned acceptance test.Added
poppler-utilstopackaging/server/Dockerfile: without it the deployed server has nopdftoppmand would refuse every PDF withToolMissing— the same failure mode this issue exists to fix.Known gap, flagged separately, not blocking this PR:
ac_3_03(real multi-page split) stays#[ignore]d. This build host has no poppler-utils/pdftoppm installed (no sudo to add it), the same reasonpdf.rs's own real-conversion test is still ignored. I can't verify or un-ignore that path here; the CTO/System Administrator should confirm poppler-utils is on the build host and the CI runner before anyone un-ignores it.Local gates (
--rust-onlyand--frontend-only) both green against a real Postgres. CI is running on the PR now.PR #106: CI mostly green (clippy, cargo deny, fmt, cargo test, frontend-web, repo boundary, pre-push hook all passed). The only red is
CI / cargo deny advisories, which is GRI-1872 — a pre-existing failure ondevitself (gtk-renderer feature: proc-macro-error, paste, glib unsoundness), unrelated to this PR's dependency tree.CI / CI(the required aggregate) is still pending, waiting on the runner queue. Will report the final verdict once it resolves.PR #106 merged into dev by Vivy at 2026-11-10T05:37:57Z (commit
9141699). Verified: dev now fast-forwards to5daa329and9141699is an ancestor. Closing — done when met: PDFs upload through pdf.rs, one media row per page with pdf_pages set on the original, document_page playlist items can reference a page. Known gap carried forward separately: ac_3_03 (real multi-page split) stays #[ignore]d pending poppler-utils on the build host/CI runner — not blocking this issue.