]> BookStack Code Mirror - bookstack/blobdiff - app/Exports/Controllers/BookExportApiController.php
Merge pull request #5731 from BookStackApp/lexical_jul25
[bookstack] / app / Exports / Controllers / BookExportApiController.php
index 431afef143db45bccfa14994b040e2a00a1d44fb..e2d0addc30c9a6c0c3e3dda887f1e869aa50506f 100644 (file)
@@ -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
+}