Admin setting for the maximum upload size

- Admin -> Settings: maximum upload size per file (1-1024 MB, default 50),
  stored in a new settings table and read on each use, so a change applies
  to every process at once
- Enforced by attachment validation and the direct-upload endpoint; upload
  forms, bulk upload and Admin -> About show the current limit
- .sam.zip import accepts files up to 1 GB to match

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-07 09:45:12 -05:00
1 parent 4f548f3874
commit ef7cd2efba
16 files changed
+186 -13

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@
<%= f.field :issue_reported, as: :textarea, label: "Issue", required: true, autofocus: true %>
<%= f.field :component_id, as: :select, label: "Component (optional)", collection: component_options(aircraft) %>
<%= f.field :attachments, as: :file, multiple: true, label: squawk.attachments.attached? ? "Add photos / files" : "Photos / files",
hint: "Select several at once. Images, PDFs or text, up to 50 MB each." %>
hint: "Select several at once. Images, PDFs or text, up to #{Setting.max_upload_mb} MB each." %>
<% if squawk.persisted? && squawk.attachments.attached? %>
<div>
<p class="label">Remove attached files</p>