1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-06 12:02:45 +03:00

ZIP Exports: Improved temp file tracking & clean-up

This commit is contained in:
Dan Brown
2024-12-31 15:13:50 +00:00
parent 980a684b14
commit 6d7ff59a89
6 changed files with 70 additions and 8 deletions

View File

@@ -75,6 +75,6 @@ class BookExportController extends Controller
$book = $this->queries->findVisibleBySlugOrFail($bookSlug);
$zip = $builder->buildForBook($book);
return $this->download()->streamedDirectly(fopen($zip, 'r'), $bookSlug . '.zip', filesize($zip));
return $this->download()->streamedFileDirectly($zip, $bookSlug . '.zip', filesize($zip), true);
}
}