M3 Integration fixes

This commit is contained in:
Mark Gregory
2026-09-21 12:05:53 +01:00
parent 9368dd2f10
commit e776eb0211
7 changed files with 25 additions and 26 deletions
@@ -23,6 +23,8 @@ class StoreDocumentationDocumentRequest extends FormRequest
*/
public function rules(): array
{
$maxUploadKb = min(max((int) config('documentation.max_upload_kb', 10240), 1), 10240);
return [
'documentation_category_id' => ['nullable', 'integer', 'exists:documentation_categories,id'],
'title' => ['required', 'string', 'max:220'],
@@ -33,9 +35,9 @@ class StoreDocumentationDocumentRequest extends FormRequest
'is_featured' => ['nullable', 'boolean'],
'version' => ['required', 'string', 'max:50'],
'reference' => ['nullable', 'string', 'max:100'],
'attachment' => ['nullable', 'file', 'max:' . config('documentation.max_upload_kb', 20480), 'mimes:' . implode(',', config('documentation.allowed_upload_mimes', []))],
'attachment' => ['nullable', 'file', 'max:' . $maxUploadKb, 'mimes:' . implode(',', config('documentation.allowed_upload_mimes', []))],
'attachments' => ['nullable', 'array'],
'attachments.*' => ['file', 'max:' . config('documentation.max_upload_kb', 20480), 'mimes:' . implode(',', config('documentation.allowed_upload_mimes', []))],
'attachments.*' => ['file', 'max:' . $maxUploadKb, 'mimes:' . implode(',', config('documentation.allowed_upload_mimes', []))],
];
}
}