fix: download the selected rows' images through the API - #398
Merged
nGervasyuk merged 2 commits intoAug 23, 2026
Merged
Conversation
nGervasyuk
force-pushed
the
fix/download-images-cors
branch
from
August 20, 2026 12:19
392d11b to
7f8ae3a
Compare
This was referenced Aug 21, 2026
nGervasyuk
force-pushed
the
fix/download-images-cors
branch
from
August 23, 2026 06:30
2cf627b to
7e59d51
Compare
The zip is built in the browser, so each image is fetched. getImage points at GET /images/:fileName, which redirects to storage — with S3 that is a pre-signed URL without CORS headers, so the fetch is blocked and the whole download fails while the same images still display fine in <img> tags. Fetch the bytes from the API's own /download route instead, falling back to the redirect when the API does not have that route yet, so this works against either API version. A response that is not ok now throws with its status code, so a missing image cannot end up in the zip as an error body named like a screenshot.
The integration suite stubs the API, so the new /images/:fileName/download request had no handler and failed as a network error rather than exercising the download.
nGervasyuk
force-pushed
the
fix/download-images-cors
branch
from
August 23, 2026 06:36
7e59d51 to
90f9f40
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Problem
"Download images for selected rows" does nothing on S3-backed deployments. The zip is built in the browser, so each image is fetched, and
staticService.getImagepoints atGET /images/:fileName— which redirects to a pre-signed S3 URL with no CORS headers, so every fetch is blocked:The same images display fine, because an
<img>tag is not subject to CORS — so the failure is only visible in the console.Change
/images/:fileName/download(fix: serve image bytes from the API for bulk download backend#369) instead of the redirecting display URL. Display keeps usinggetImage, so image traffic still bypasses the API.<screen>.png.Type-checked; unit and integration suites pass (the integration environment runs a published API without the new route, which is exactly the fallback path).
Nothing to configure. Independent of the other open frontend PRs (#397, #398, #399, #400, #401) — verified that they all merge onto
masterin sequence without conflicts, in any order.