Skip to content

Conversation

@guquan-lengyue
Copy link
Contributor

@guquan-lengyue guquan-lengyue commented Jun 15, 2025

In the ImageViewer.vue component, the original download functionality utilized the mixin's download function, which relied on props.item.path. This path remains static and isn't updated by the next and prev functions, leading to incorrect file downloads.

To fix this, the download function in ImageViewer.vue has been overridden. The updated implementation now uses data.currentItem.path, which dynamically changes with the next and prev functions, ensuring accurate file downloads.
Close #2210

In the `ImageViewer.vue` component, the original download functionality utilized the mixin's download function, which relied on `props.item.path`. This path remains static and isn't updated by the `next` and `prev` functions, leading to incorrect file downloads.

To fix this, the download function in `ImageViewer.vue` has been overridden. The updated implementation now uses `data.currentItem.path`, which dynamically changes with the `next` and `prev` functions, ensuring accurate file downloads.
@guquan-lengyue guquan-lengyue changed the title fix(ImageViewer): Resolve file download issue #2210 fix(ImageViewer): Resolve file download issue https://github.com/IceWhaleTech/CasaOS/issues/2210 Jun 15, 2025
@guquan-lengyue guquan-lengyue marked this pull request as ready for review June 15, 2025 13:50
@sonarqubecloud
Copy link

@jeremyhann jeremyhann merged commit 98964af into IceWhaleTech:main Jun 16, 2025
2 of 3 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.

[Bug] Download button downloads the wrong file

2 participants