Skip to content

Commit

Permalink
feat(nit): 2048(kb) -> 2mb & add to update rules (just in case!)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScuffedNewt committed Aug 27, 2024
1 parent c08496f commit 0fc1b54
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions app/Models/Character/Character.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
];

Expand All @@ -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',
];

/**
Expand Down
6 changes: 4 additions & 2 deletions app/Models/Character/CharacterImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
];

/**
Expand All @@ -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',
];

/**********************************************************************************************
Expand Down

0 comments on commit 0fc1b54

Please sign in to comment.