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

@@ -0,0 +1,10 @@
class CreateSettings < ActiveRecord::Migration[8.1]
def change
create_table :settings do |t|
t.string :key, null: false
t.text :value
t.timestamps
end
add_index :settings, :key, unique: true
end
end
Generated
+9 -1
View File
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[8.1].define(version: 2026_11_07_170000) do
ActiveRecord::Schema[8.1].define(version: 2026_11_07_180000) do
create_table "active_storage_attachments", force: :cascade do |t|
t.string "name", null: false
t.string "record_type", null: false
@@ -498,6 +498,14 @@ ActiveRecord::Schema[8.1].define(version: 2026_11_07_170000) do
t.index ["user_id"], name: "index_sessions_on_user_id"
end
create_table "settings", force: :cascade do |t|
t.string "key", null: false
t.text "value"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["key"], name: "index_settings_on_key", unique: true
end
create_table "share_tokens", force: :cascade do |t|
t.integer "aircraft_id", null: false
t.integer "created_by_id"