mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-06 12:02:45 +03:00
API: Initial review pass of zip import/export endpoints
Review of #5592
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user