]> BookStack Code Mirror - bookstack/blobdiff - app/Uploads/Controllers/AttachmentController.php
Comments: Added HTML filter on load, tinymce elem filtering
[bookstack] / app / Uploads / Controllers / AttachmentController.php
index 92f23465d2234f8ef8469a14efdbe0a75f8081eb..e61c1033884586d10957236b2bfe2668cfa690aa 100644 (file)
@@ -226,12 +226,13 @@ class AttachmentController extends Controller
 
         $fileName = $attachment->getFileName();
         $attachmentStream = $this->attachmentService->streamAttachmentFromStorage($attachment);
+        $attachmentSize = $this->attachmentService->getAttachmentFileSize($attachment);
 
         if ($request->get('open') === 'true') {
-            return $this->download()->streamedInline($attachmentStream, $fileName);
+            return $this->download()->streamedInline($attachmentStream, $fileName, $attachmentSize);
         }
 
-        return $this->download()->streamedDirectly($attachmentStream, $fileName);
+        return $this->download()->streamedDirectly($attachmentStream, $fileName, $attachmentSize);
     }
 
     /**