This commit is contained in:
@@ -43,9 +43,9 @@ func handleEbook(c *fiber.Ctx) error {
|
|||||||
|
|
||||||
cmd := exec.Command(path.Join(rootPath, "genpdf"), "generate:ebook", sp)
|
cmd := exec.Command(path.Join(rootPath, "genpdf"), "generate:ebook", sp)
|
||||||
|
|
||||||
o, err := cmd.Output()
|
o, err := cmd.CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return c.Status(fiber.StatusInternalServerError).SendString(fmt.Sprintf("failed to convert ebook: %s", err))
|
return c.Status(fiber.StatusInternalServerError).SendString(fmt.Sprintf("failed to convert ebook: %s", string(o)))
|
||||||
}
|
}
|
||||||
err = c.Download(strings.TrimSpace(string(o)))
|
err = c.Download(strings.TrimSpace(string(o)))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user