Skip to content

adds option to manually upload book cover image - #7

Merged
pagyP merged 10 commits into
mainfrom
feature-upload-photo
Mar 3, 2026
Merged

adds option to manually upload book cover image#7
pagyP merged 10 commits into
mainfrom
feature-upload-photo

Conversation

@pagyP

@pagyP pagyP commented Mar 3, 2026

Copy link
Copy Markdown
Owner

No description provided.

Comment thread app.py Fixed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds manual book cover image uploads to the Add/Edit book flows, storing uploaded images under static/uploads/covers and prioritizing uploads over ISBN-based cover URLs.

Changes:

  • Enable multipart form uploads and add a cover_image file input with client-side preview on add/edit book pages.
  • Implement server-side image upload/save + local cover cleanup when replacing/deleting books.
  • Ignore uploaded cover files in git while keeping the upload directory tracked.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
templates/add_book.html Adds cover upload input + preview script; sets form enctype for file upload.
templates/edit_book.html Adds cover upload input + preview script; sets form enctype; tweaks cover section labeling.
app.py Adds upload configuration, implements save_cover_upload() / delete_local_cover(), integrates upload priority into add/edit/delete routes.
static/uploads/covers/.gitkeep Keeps upload directory present in the repo.
.gitignore Ignores uploaded cover images while allowing .gitkeep.
.github/copilot-instructions.md Documents repo architecture and conventions, including cover upload handling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app.py
Comment thread templates/add_book.html Outdated
Comment thread templates/edit_book.html Outdated
Comment thread app.py Outdated
Comment thread app.py
Comment thread app.py Outdated
Comment thread app.py
Comment thread app.py Fixed
Comment thread app.py Fixed
@pagyP
pagyP merged commit 175ac37 into main Mar 3, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants