+
+
+ /**
+ * 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);
+ }
+}
\ No newline at end of file