$this->settings->get(Setting::MaxZipDownloadSizeMb), // Not a setting, and shown here because this is where somebody // coming from v1 looks for one: v1 had a "Download method" // dropdown on its uploads options screen. It is an environment // variable now rather than a stored setting, because it // describes the server the installation is running on rather // than a preference — a value in the database can be restored // onto a different server and be wrong there. 'file_delivery' => $this->delivery->describe(), ]); } public function update(Request $request): RedirectResponse { $validated = $request->validate([ // Same ceiling as the upload size field: a megabyte figure // large enough to be meaningless is the same as unlimited, // which 0 already says more clearly. 'max_zip_download_size_mb' => ['required', 'integer', 'min:0', 'max:1048576'], ]); $this->settings->set(Setting::MaxZipDownloadSizeMb, (int) $validated['max_zip_download_size_mb']); $this->activity->log(Action::SettingsUpdated, context: ['section' => 'downloads']); return back(); } }