]> BookStack Code Mirror - bookstack/blobdiff - app/Exports/Controllers/ChapterExportController.php
ZIP Exports: Improved temp file tracking & clean-up
[bookstack] / app / Exports / Controllers / ChapterExportController.php
index 0d7a5c0d195ec94181cbacca251a632d2008e7c0..4748ca6a80a4ce3d93aeea5068d5b055fc3538bc 100644 (file)
@@ -81,6 +81,6 @@ class ChapterExportController extends Controller
         $chapter = $this->queries->findVisibleBySlugsOrFail($bookSlug, $chapterSlug);
         $zip = $builder->buildForChapter($chapter);
 
-        return $this->download()->streamedDirectly(fopen($zip, 'r'), $chapterSlug . '.zip', filesize($zip));
+        return $this->download()->streamedFileDirectly($zip, $chapterSlug . '.zip', filesize($zip), true);
     }
 }