]> BookStack Code Mirror - bookstack/blobdiff - app/Exports/Controllers/ChapterExportApiController.php
Merge pull request #5731 from BookStackApp/lexical_jul25
[bookstack] / app / Exports / Controllers / ChapterExportApiController.php
index 58df4c9b0872f2f7b026654834b745e604f7f977..66e2276b5ce2d6401b355b7d05992c494658fbbb 100644 (file)
@@ -68,9 +68,8 @@ class ChapterExportApiController extends ApiController
     public function exportZip(int $id, ZipExportBuilder $builder)
     {
         $chapter = $this->queries->findVisibleByIdOrFail($id);
-        $chapterName= $chapter->getShortName();
         $zip = $builder->buildForChapter($chapter);
 
-        return $this->download()->streamedFileDirectly($zip, $chapterName . '.zip', filesize($zip), true);
+        return $this->download()->streamedFileDirectly($zip, $chapter->slug . '.zip', true);
     }
-}
\ No newline at end of file
+}