'Download multiple files in angular using s3 presigned urls

In my applicaton i have a list of s3 presigned urls and i download them ion click of a button but it creates multiple tabs . Can it be done in one tab. Also I dont want to refresh my page as it sends user to home page



Solution 1:[1]

You have a mistake on this line

const {products, setProducts} = useState([]);

This should be:

const [products, setProducts] = useState([]);

Your setProducts isn't working as it should be.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Sudip Sarker