Skip to content

Loading an epub from a generator script. #109

Open
@dsancheznet

Description

Hello everybody, I am the author of mybrary and I'm happy to announce that I'm working on an integration of bibi into the system as an online epub reader for books stored in the library. I'm having problems loading a book that is streamed by a php script. The script does something like (abbreviated example):

    header('Content-Type: application/epub+zip');
    header("Pragma: no-cache");
    header("Expires: 0");
    echo file_get_contents( $epubData );   

The reason I'm doing it this way is that I do not want to expose the file to unauthenticated users. Doe to this reason, all books and covers are stored in a non public directory, out of reach of the web users. I have been adapting the js files quite heavily to be able to integrate the script into my file structure. As soon as I try to load a book streamed by the downloader script, I get the following error:

image

I am calling the reader in the following manner:

epub.html?book=getbook.php?id%3D1.epub"

Does somebody have a clue on what could be happening? Is it even possible to load en epub this way?

By the way: I'm using PDF.js as well, and it works without flaws calling it this way.

Best regards
D.Sánchez

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions