epub icon indicating copy to clipboard operation
epub copied to clipboard

readFile hangs forever when loading any file

Open aloncarmel opened this issue 9 years ago • 2 comments

I dont know if im doing something wrong, but when i try to load a file

var EPub = require("epub");
    var epub = new EPub('EPUBFILE', '/images/IMG_ID/IMG_FILENAME', '/chapters/');

    epub.on("end", function(){
        // epub is now usable

                epub.getFile("coverstyle", function(error, data, mimeType){

                    console.log(error);
                    console.log(data);


                });

                res.send('done')

    });

Nothing works, it hangs forever.

aloncarmel avatar Jun 02 '15 15:06 aloncarmel

Hi, I have the same issue, it hangs on forever !

Allaoua9 avatar Mar 16 '16 10:03 Allaoua9

Hi again,

You need to call epub.parse() after opening the file.

@julien-c you've done a great work, too bad the doc is not much clear.

Allaoua9 avatar Mar 16 '16 10:03 Allaoua9