Add download functionality for equipment attachments

- Introduced a new endpoint `GET /equipment/{id}/attachment/download` in the API for downloading equipment attachment files.
- Implemented the `downloadEquipmentAttachmentFile` function in the client to handle file downloads via the API, ensuring proper token management and blob handling.
- Updated the EquipmentAttachmentInput, EquipmentList, and EquipmentShow components to utilize the new download link, enhancing user experience by allowing direct downloads without exposing the MinIO URL.
- Added a new EquipmentAttachmentLink component to encapsulate the download link logic and improve code reusability.
This commit is contained in:
Первов Артем
2026-04-21 01:26:00 +03:00
parent eb36c04a4b
commit 4584a0d581
10 changed files with 184 additions and 11 deletions

View File

@@ -361,6 +361,14 @@ api API.Equipment {
type uuid;
}
}
endpoint downloadEquipmentAttachment {
label "GET /equipment/{id}/attachment/download";
description "Скачать файл-вложение (Content-Disposition: attachment, поток из MinIO)";
attribute id {
type uuid;
}
}
}
api API.EquipmentStatusChange {