From 0fc1b54faefa1f0b83d83c4057faee300de4a260 Mon Sep 17 00:00:00 2001 From: ScuffedNewt Date: Tue, 27 Aug 2024 21:23:20 +0100 Subject: [PATCH] feat(nit): 2048(kb) -> 2mb & add to update rules (just in case!) --- app/Models/Character/Character.php | 6 ++++-- app/Models/Character/CharacterImage.php | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/Models/Character/Character.php b/app/Models/Character/Character.php index 1d6d4d2ee9..32234a7233 100644 --- a/app/Models/Character/Character.php +++ b/app/Models/Character/Character.php @@ -78,8 +78,8 @@ class Character extends Model { 'slug' => 'required|alpha_dash', 'description' => 'nullable', 'sale_value' => 'nullable', - 'image' => 'required|mimes:jpeg,jpg,gif,png|max:2048', - 'thumbnail' => 'nullable|mimes:jpeg,jpg,gif,png|max:2048', + 'image' => 'required|mimes:jpeg,jpg,gif,png|max:2mb', + 'thumbnail' => 'nullable|mimes:jpeg,jpg,gif,png|max:2mb', 'owner_url' => 'url|nullable', ]; @@ -94,6 +94,8 @@ class Character extends Model { 'slug' => 'required', 'description' => 'nullable', 'sale_value' => 'nullable', + 'image' => 'nullable|mimes:jpeg,jpg,gif,png|max:2mb', + 'thumbnail' => 'nullable|mimes:jpeg,jpg,gif,png|max:2mb', ]; /** diff --git a/app/Models/Character/CharacterImage.php b/app/Models/Character/CharacterImage.php index 7bf5eada21..83bcf4b23c 100644 --- a/app/Models/Character/CharacterImage.php +++ b/app/Models/Character/CharacterImage.php @@ -47,8 +47,8 @@ class CharacterImage extends Model { public static $createRules = [ 'species_id' => 'required', 'rarity_id' => 'required', - 'image' => 'required|mimes:jpeg,jpg,gif,png,webp|max:2048', - 'thumbnail' => 'nullable|mimes:jpeg,jpg,gif,png,webp|max:2048', + 'image' => 'required|mimes:jpeg,jpg,gif,png,webp|max:2mb', + 'thumbnail' => 'nullable|mimes:jpeg,jpg,gif,png,webp|max:2mb', ]; /** @@ -62,6 +62,8 @@ class CharacterImage extends Model { 'species_id' => 'required', 'rarity_id' => 'required', 'description' => 'nullable', + 'image' => 'mimes:jpeg,jpg,gif,png,webp|max:2mb', + 'thumbnail' => 'nullable|mimes:jpeg,jpg,gif,png,webp|max:2mb', ]; /**********************************************************************************************