]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/Controller.php
Fixed drawing handling on HTML to Markdown conversion
[bookstack] / app / Http / Controllers / Controller.php
index 6ca2239cccb90ed6da8a34ad27986cb84eb1de8f..c00ac938bdae2b56586d4d97bc74820cd5b7bbd5 100644 (file)
@@ -126,7 +126,7 @@ abstract class Controller extends BaseController
      */
     protected function streamedDownloadResponse($stream, string $fileName): StreamedResponse
     {
-        return response()->stream(function() use ($stream) {
+        return response()->stream(function () use ($stream) {
             // End & flush the output buffer otherwise we still seem to use memory.
             // Ignore in testing since output buffers are used to gather a response.
             if (!app()->runningUnitTests()) {
@@ -167,10 +167,10 @@ abstract class Controller extends BaseController
         $sniffContent = fread($stream, 1000);
         $mime = (new WebSafeMimeSniffer())->sniff($sniffContent);
 
-        return response()->stream(function() use ($sniffContent, $stream) {
-           echo $sniffContent;
-           fpassthru($stream);
-           fclose($stream);
+        return response()->stream(function () use ($sniffContent, $stream) {
+            echo $sniffContent;
+            fpassthru($stream);
+            fclose($stream);
         }, 200, [
             'Content-Type'           => $mime,
             'Content-Disposition'    => 'inline; filename="' . str_replace('"', '', $fileName) . '"',