Download file from IPFS onClick of button

Hello guys, I wanna download a pdf onClick of the button from IPFS so I tried the below code.

const downloadURL = `https://${cid}.ipfs.dweb.link/${fileName}?filename=${fileName}`;

// const downloadURL = `https://${cid}.ipfs.dweb.link/${fileName}?download=true`.

console.log( downloadURL, 'DownloadUrl from storeFiles');

setDownload(downloadURL)

However, both download URL is just redirecting to that pdf and It doesn’t download that pdf file. so any help, please!
Thank you.