X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/82e8b1577ec0c7b136da5eed9c89d4790714814c..refs/pull/3693/head:/app/Http/Controllers/AttachmentController.php diff --git a/app/Http/Controllers/AttachmentController.php b/app/Http/Controllers/AttachmentController.php index 7f5ffc8cb..03e362f4a 100644 --- a/app/Http/Controllers/AttachmentController.php +++ b/app/Http/Controllers/AttachmentController.php @@ -10,7 +10,6 @@ use BookStack\Uploads\AttachmentService; use Exception; use Illuminate\Contracts\Filesystem\FileNotFoundException; use Illuminate\Http\Request; -use Illuminate\Support\Facades\Storage; use Illuminate\Support\MessageBag; use Illuminate\Validation\ValidationException; @@ -234,10 +233,10 @@ class AttachmentController extends Controller $attachmentStream = $this->attachmentService->streamAttachmentFromStorage($attachment); if ($request->get('open') === 'true') { - return $this->streamedInlineDownloadResponse($attachmentStream, $fileName); + return $this->download()->streamedInline($attachmentStream, $fileName); } - return $this->streamedDownloadResponse($attachmentStream, $fileName); + return $this->download()->streamedDirectly($attachmentStream, $fileName); } /**