LWT JavaScript API
    Preparing search index...
    • Submit a form's fields as an EPUB import and normalise the outcome.

      Collapses the three failure shapes — transport error, envelope error, and a handled success: false — into a single error string, so callers only have to check whether bookId came back.

      Parameters

      • form: HTMLFormElement

        Form holding the file input and language field

      Returns Promise<EpubImportOutcome>

      Book ID on success, otherwise a non-empty error