Bilder für Bibliotheks items hinzu fügen für detailed view #31

Closed
opened 2026-08-08 15:28:46 +00:00 by Aiirondev · 8 comments
Owner
No description provided.
Aiirondev added this to the Version v1.0.0 milestone 2026-08-08 15:28:46 +00:00
Aiirondev added the Kind/Feature
Priority
Critical
1
labels 2026-08-08 15:28:46 +00:00
Aiirondev_dev was assigned by Aiirondev 2026-08-08 15:28:46 +00:00
Aiirondev modified the milestone from Version v1.0.0 to v0.14.0 2026-08-09 21:24:02 +00:00
Aiirondev added spent time 2 hours 2026-08-15 14:41:14 +00:00
Aiirondev started working 2026-08-16 20:10:23 +00:00
Aiirondev canceled time tracking 2026-08-16 20:10:24 +00:00
Aiirondev added spent time 1 hour 2 minutes 2026-08-16 20:10:30 +00:00
Aiirondev started working 2026-08-16 20:10:31 +00:00
Author
Owner

Fix image processing pipeline and book cover previews

Backend Updates

Direct GridFS Integration

Refactored the /download_book_cover route to process downloaded images entirely in-memory (using io.BytesIO) and save them directly to MongoDB GridFS. This eliminates the reliance on local file storage and instantly makes the image available for the frontend preview.

Security & Validation

Maintained strict SSRF protection, added 5MB chunked download limits, and enforced MIME-type validation before inserting data into the database.

Frontend Updates

Fixed Broken Image URLs

Replaced server-side Jinja syntax ({{ url_for(...) }}) inside JavaScript with reliable relative paths (/uploads/${filename}), fixing broken image links in both the detail modal and upload previews.

Separated Preview Containers

Created a dedicated #book-cover-preview-container to prevent manual image uploads from accidentally overwriting and deleting the fetched book cover's hidden input data.

Fixed Image Deletion State

Updated the removeImagePreview logic to rely on the DOM element's actual position rather than static loop indices, preventing array out-of-bounds errors when removing selected files.

Code Cleanup

Removed obsolete video detection and thumbnail processing logic from the detail modal to improve rendering stability.

Commit: c62b2b553d
PreRelease: v0.13.16-dev.7

## Fix image processing pipeline and book cover previews ### Backend Updates #### Direct GridFS Integration Refactored the /download_book_cover route to process downloaded images entirely in-memory (using io.BytesIO) and save them directly to MongoDB GridFS. This eliminates the reliance on local file storage and instantly makes the image available for the frontend preview. #### Security & Validation Maintained strict SSRF protection, added 5MB chunked download limits, and enforced MIME-type validation before inserting data into the database. ### Frontend Updates #### Fixed Broken Image URLs Replaced server-side Jinja syntax ({{ url_for(...) }}) inside JavaScript with reliable relative paths (/uploads/${filename}), fixing broken image links in both the detail modal and upload previews. #### Separated Preview Containers Created a dedicated #book-cover-preview-container to prevent manual image uploads from accidentally overwriting and deleting the fetched book cover's hidden input data. #### Fixed Image Deletion State Updated the removeImagePreview logic to rely on the DOM element's actual position rather than static loop indices, preventing array out-of-bounds errors when removing selected files. #### Code Cleanup Removed obsolete video detection and thumbnail processing logic from the detail modal to improve rendering stability. Commit: c62b2b553dbf83396d1c53a73ae663627f227cae PreRelease: v0.13.16-dev.7
Author
Owner

Commit: 542caa520f
PreRelease: v0.13.16-dev.8

Commit: 542caa520f1c4d71542b0d4d2c29f2c8b592ea6f PreRelease: v0.13.16-dev.8
Author
Owner

Commit: 2528e79895
PreRelease: v0.13.16-dev.10

Commit: 2528e79895b7f0cbc816c2f3e85cbfad7f5e6f05 PreRelease: v0.13.16-dev.10
Aiirondev worked for 1 hour 44 minutes 2026-08-16 21:54:35 +00:00
Author
Owner

Commit: 7e5ee7b5ea
PreRelease: v0.13.16-dev.11

Commit: 7e5ee7b5eaf1207cace63662fca09d766c242b94 PreRelease: v0.13.16-dev.11
Author
Owner

Commit: f6e3db9b4a
PreRelease: v0.13.16-dev.12

Commit: f6e3db9b4a30b54a91cd8c0ab72c40d02b1e677c PreRelease: v0.13.16-dev.12
Author
Owner

Commit: 41d9c0a848
PreRelease: v0.13.16-dev.13

Commit: 41d9c0a8485f28bfda88b312095bf2fef758ce7f PreRelease: v0.13.16-dev.13
Author
Owner

Commit: 0ea5d2db26
PreRelease: v0.13.16-dev.14

Commit: 0ea5d2db264adb6ce99f32f603e832829a731a05 PreRelease: v0.13.16-dev.14
Author
Owner

Verified and Correct implementation:

Patch Version: v0.13.16

Verified and Correct implementation: Patch Version: v0.13.16
Aiirondev added spent time 2 hours 2026-08-16 23:11:23 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Total Time Spent: 6 hours 46 minutes
Aiirondev
6 hours 46 minutes
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Invario/Inventarsystem#31