<% content_for :title, "Settings" %>

Settings

<%= form_with url: admin_settings_path, method: :patch, class: "card card-body max-w-xl space-y-4" do |f| %> <% if @errors.present? %> <% end %>

Uploads

<% upload = Setting::INTEGERS["max_upload_mb"] %>
<%= label_tag "settings[max_upload_mb]", upload[:label], class: "label" %> <%= number_field_tag "settings[max_upload_mb]", @values["max_upload_mb"], id: "settings_max_upload_mb", min: upload[:in].min, max: upload[:in].max, step: 1, required: true, class: "input w-32" %>

The largest single file anyone can upload: documents, squawk photos and bulk uploads. Default <%= upload[:default] %> MB, up to <%= upload[:in].max %> MB.

A proxy in front of the app can have its own, smaller limit. Cloudflare's proxy stops at 100 MB on its free plan; nginx needs client_max_body_size. Logbook transcription with Claude reads PDFs up to <%= LogbookTranscriber::MAX_PDF_BYTES / 1.megabyte %> MB and images up to <%= LogbookTranscriber::MAX_IMAGE_BYTES / 1.megabyte %> MB, whatever this is set to.

<%= f.submit "Save Settings", class: "btn-primary" %><%= link_to "Cancel", admin_about_path, class: "btn-secondary" %>
<% end %>