Add supported file types and max caption length to new post form.
Closes #121 and #136
This commit is contained in:
parent
b437b62780
commit
c53e963537
7 changed files with 70 additions and 37 deletions
|
@ -30,8 +30,8 @@ class StatusController extends Controller
|
|||
$user = Auth::user();
|
||||
|
||||
$this->validate($request, [
|
||||
'photo' => 'required|image|max:15000',
|
||||
'caption' => 'string|max:150'
|
||||
'photo' => 'required|mimes:jpeg,png,bmp,gif|max:' . config('pixelfed.max_photo_size'),
|
||||
'caption' => 'string|max:' . config('pixelfed.max_caption_length')
|
||||
]);
|
||||
|
||||
$monthHash = hash('sha1', date('Y') . date('m'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue