use BookStack\Entities\Repos\PageRepo;
use BookStack\Exceptions\FileUploadException;
use BookStack\Exceptions\NotFoundException;
use BookStack\Entities\Repos\PageRepo;
use BookStack\Exceptions\FileUploadException;
use BookStack\Exceptions\NotFoundException;
{
public function __construct(
protected AttachmentService $attachmentService,
{
public function __construct(
protected AttachmentService $attachmentService,
$this->checkPermission('attachment-create-all');
$this->checkOwnablePermission('page-update', $page);
$this->checkPermission('attachment-create-all');
$this->checkOwnablePermission('page-update', $page);
$this->checkPermission('attachment-create-all');
$this->checkOwnablePermission('page-update', $page);
$this->checkPermission('attachment-create-all');
$this->checkOwnablePermission('page-update', $page);
$this->checkOwnablePermission('page-view', $page);
return view('attachments.manager-list', [
$this->checkOwnablePermission('page-view', $page);
return view('attachments.manager-list', [
$this->validate($request, [
'order' => ['required', 'array'],
]);
$this->validate($request, [
'order' => ['required', 'array'],
]);
$this->checkOwnablePermission('page-update', $page);
$attachmentOrder = $request->get('order');
$this->checkOwnablePermission('page-update', $page);
$attachmentOrder = $request->get('order');
} catch (NotFoundException $exception) {
throw new NotFoundException(trans('errors.attachment_not_found'));
}
} catch (NotFoundException $exception) {
throw new NotFoundException(trans('errors.attachment_not_found'));
}
$fileName = $attachment->getFileName();
$attachmentStream = $this->attachmentService->streamAttachmentFromStorage($attachment);
$fileName = $attachment->getFileName();
$attachmentStream = $this->attachmentService->streamAttachmentFromStorage($attachment);