Add supported file types and max caption length to new post form.

Closes #121 and #136
This commit is contained in:
Daniel Supernault 2018-06-02 16:53:35 -06:00
parent b437b62780
commit c53e963537
7 changed files with 70 additions and 37 deletions

View file

@ -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'));