Fixed attachment error handling, Allowed all link types

Related to #812
This commit is contained in:
Dan Brown
2018-05-20 11:06:10 +01:00
parent 019b8196ad
commit a1ecdcacba
3 changed files with 12 additions and 6 deletions

View File

@ -103,7 +103,7 @@ class AttachmentController extends Controller
$this->validate($request, [
'uploaded_to' => 'required|integer|exists:pages,id',
'name' => 'required|string|min:1|max:255',
'link' => 'url|min:1|max:255'
'link' => 'string|min:1|max:255'
]);
$pageId = $request->get('uploaded_to');
@ -131,7 +131,7 @@ class AttachmentController extends Controller
$this->validate($request, [
'uploaded_to' => 'required|integer|exists:pages,id',
'name' => 'required|string|min:1|max:255',
'link' => 'required|url|min:1|max:255'
'link' => 'required|string|min:1|max:255'
]);
$pageId = $request->get('uploaded_to');
@ -184,6 +184,7 @@ class AttachmentController extends Controller
* @param $attachmentId
* @return \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Symfony\Component\HttpFoundation\Response
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
* @throws NotFoundException
*/
public function get($attachmentId)
{