Skip to content

Legislation: Support PDF Upload for Full Text - #176

Merged
calebyhan merged 1 commit into
mainfrom
163/legislation-pdf-upload
Jul 4, 2026
Merged

Legislation: Support PDF Upload for Full Text#176
calebyhan merged 1 commit into
mainfrom
163/legislation-pdf-upload

Conversation

@calebyhan

Copy link
Copy Markdown
Contributor

Legislative full text must preserve precise formatting (indentation, section numbering, tables). The current rich text editor does not reliably maintain this formatting. Allowing a PDF to be uploaded and stored as the canonical full text preserves the document exactly as authored.

Changes:

  • Added a full_text_pdf_url column to the Legislation model and exposed it on the list/create/update DTOs
  • Extended the admin upload endpoint to accept application/pdf alongside images, skipping the image-resize path for PDFs
  • Added a PDF file input to LegislationForm that uploads via the existing upload helper and stores the returned URL alongside the rich text body
  • On the public legislation detail page, render a download link for the PDF when full_text_pdf_url is present

Closes #163

Adds full_text_pdf_url to the Legislation model/schemas, extends the
admin upload endpoint to accept PDFs, lets admins attach a PDF in
LegislationForm, and shows a download link on the public legislation
detail page when present. (#163)
@github-actions

Copy link
Copy Markdown

Test Results

570 tests  ±0   570 ✅ ±0   49s ⏱️ -1s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit c3d83f2. ± Comparison against base commit bc11881.

@MasonMines2006 MasonMines2006 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@calebyhan
calebyhan merged commit 0e35b08 into main Jul 4, 2026
3 checks passed
@calebyhan
calebyhan deleted the 163/legislation-pdf-upload branch July 4, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Legislation: Support PDF Upload for Full Text

2 participants