$book = $this->bookRepo->getBySlug($bookSlug);
$pdfContent = $this->exportFormatter->bookToPdf($book);
- return $this->downloadResponse($pdfContent, $bookSlug . '.pdf');
+ return $this->download()->directly($pdfContent, $bookSlug . '.pdf');
}
/**
$book = $this->bookRepo->getBySlug($bookSlug);
$htmlContent = $this->exportFormatter->bookToContainedHtml($book);
- return $this->downloadResponse($htmlContent, $bookSlug . '.html');
+ return $this->download()->directly($htmlContent, $bookSlug . '.html');
}
/**
$book = $this->bookRepo->getBySlug($bookSlug);
$textContent = $this->exportFormatter->bookToPlainText($book);
- return $this->downloadResponse($textContent, $bookSlug . '.txt');
+ return $this->download()->directly($textContent, $bookSlug . '.txt');
}
/**
$book = $this->bookRepo->getBySlug($bookSlug);
$textContent = $this->exportFormatter->bookToMarkdown($book);
- return $this->downloadResponse($textContent, $bookSlug . '.md');
+ return $this->download()->directly($textContent, $bookSlug . '.md');
}
}