Skip to content

Commit a9436d4

Browse files
authored
fix(download): use direct_url so filename keeps its extension (#130)
The REST migration mapped ApiImage.download.file_url -> ImageInfo.file_url, but that field is the pretty mirror-selector URL (successor of the legacy redi_url) without a file extension. Pre-migration the download pipeline consumed the legacy file_url, which is now exposed as direct_url. Passing direct_url restores the original behavior: the backend extracts a filename with a proper extension, and decompression plus QDL extraction work again.
1 parent aabb28c commit a9436d4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/hooks/useFlashOperation.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,9 @@ export function useFlashOperation({
275275
}, POLLING.DOWNLOAD_PROGRESS);
276276

277277
try {
278-
const path = await downloadImage(image.file_url, image.sha_url);
278+
// direct_url carries the full filename; file_url is the pretty
279+
// mirror-selector URL (legacy redi_url) and has no extension.
280+
const path = await downloadImage(image.direct_url, image.sha_url);
279281
setImagePath(path);
280282
if (intervalRef.current) clearInterval(intervalRef.current);
281283
startFlash(path);

0 commit comments

Comments
 (0)