Skip to content

Add book upload functionality to the web UI #18

Description

@dfface

Description:

It would be very useful to upload books directly through the web interface instead of manually copying files into the library directory. Right now, adding a book appears to require filesystem access, SSH/FTP, USB transfer, or some other external method. This is inconvenient, especially when EPUB Browser is running on a remote server or when using the Kindle-focused page.

A built-in upload feature would make the app much more self-contained and easier to use.

Current behavior:

  • Books are discovered from the library directory.
  • There is no upload button or form in the web UI.
  • kindle-library.html is effectively read-only.
  • To add a new book, the user must place the file into the library folder manually.

Proposed behavior:

  • Add an Upload button or form to the main library page.
  • Support uploading at least .epub files, and ideally .pdf files as well, consistent with what the library page already lists.
  • Save uploaded files into the configured library directory.
  • Show upload progress and clear success/error messages.
  • Automatically refresh the book list after a successful upload.
  • If feasible, add an upload entry or link on kindle-library.html, or provide a mobile-friendly upload page that can be opened from another device.
  • Handle basic security and validation:
    • optional authentication if configured,
    • allowed file extensions/MIME types,
    • maximum file size limit,
    • protection against path traversal,
    • duplicate filename handling.

Why this matters:

Uploading books from the browser would remove the need for external tools and manual file management. It would make EPUB Browser easier for non-technical users, more convenient for remote setups, and much more practical for Kindle users who want to add books without dealing with the underlying filesystem.

Additional context:

  • PDF upload should ideally be accepted alongside EPUB, especially if PDF reading support is added later.
  • If PDF support is not ready yet, the upload feature could still accept EPUB first and add PDF support afterwards.
  • This would make the library workflow feel complete: upload, browse, and read from the same interface.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions