Need an anchor tag to download a binary file inside a td table cell

I’m trying to achieve something like I’ve shown in the image.

When an user clicks on that anchor tag, a fileselector should appear and binary (.bin) file has to get downloaded in the location where user selects. (https://i.stack.imgur.com/OGhw1.png)

I’ve created ‘a’ tag, and set all the attributes like ‘download’, ‘filename’ etc.
But, I’m not able to download it. I’m implementing it in a webview of VSCode extension.

I don’t want to post the complete code as previously question got closed due to some confusion. So, please help me with the ways/code to achieve this from scratch. Thanks in advance.