https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42804

--- Comment #1 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 200155
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200155&action=edit
Bug 42804: Replace svc/cover_images and upload-cover-image.pl with REST API
client

This patch replaces the CGI-based cover image upload workflow with
the REST API endpoints from bugs 42404 and 42405.

Changes:
- Rewrite CoverImageAPIClient to use /api/v1 endpoints
- Rewrite upload-images.js: single uploads POST directly to the API,
  batch uploads enqueue a background job and poll with updateProgress
- Remove CGI form action from upload-images.tt
- Add job progress panel for batch imports
- Delete uses DELETE /api/v1/cover_images/{image_id}
- No longer depends on file-upload.js or the svc/cover_images CGI

Test plan:
1. Apply patches for bugs 42404, 42405, and this one
2. Navigate to Tools > Upload local cover image
3. Upload a single image for a biblio
=> SUCCESS: Image uploads without page reload, success message shown
4. Upload a zip file with idlink.txt
=> SUCCESS: Progress bar shown, completion message with image count
5. Click delete on an existing cover image thumbnail
=> SUCCESS: Image removed without page reload
6. Navigate to a specific biblio detail page, click upload cover image
=> SUCCESS: Single image uploads correctly for that biblio
7. Sign off :-D

Sponsored-by: ByWater Solutions

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to