X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/3626a2265b8f4acdbbcff82bd4c1dcdef6cadd40..c8cfec96dc11a3adaed7f7c3545ca35faa5deab3:/app/Exports/Controllers/BookExportApiController.php diff --git a/app/Exports/Controllers/BookExportApiController.php b/app/Exports/Controllers/BookExportApiController.php index 431afef14..e2d0addc3 100644 --- a/app/Exports/Controllers/BookExportApiController.php +++ b/app/Exports/Controllers/BookExportApiController.php @@ -65,18 +65,14 @@ class BookExportApiController extends ApiController return $this->download()->directly($markdown, $book->slug . '.md'); } - /** * Export a book to a contained ZIP export file. - * @throws NotFoundException */ public function exportZip(int $id, ZipExportBuilder $builder) { $book = $this->queries->findVisibleByIdOrFail($id); - $bookName= $book->getShortName(); - $zip = $builder->buildForBook($book); - return $this->download()->streamedFileDirectly($zip, $bookName . '.zip', filesize($zip), true); + return $this->download()->streamedFileDirectly($zip, $book->slug . '.zip', true); } -} \ No newline at end of file +}