Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Link to - provide absolute path

I have below code

<Link className={classes.btnText}  key= {props.id} 
                to= {"https://s3.amazonaws.com/pdf/download.pdf" } target="_blank" download>Brochure <span> &darr; </span> </Link>

The issue is i'm not able to give the absolute path. It is getting updated as

localhost:3000/https://s3.amazonaws.com/pdf/download.pdf

Can i know how to give complete url

like image 771
upog Avatar asked Mar 25 '26 04:03

upog


1 Answers

You can use <a> tag instead

<a href="https://s3.amazonaws.com/pdf/download.pdf" target="_blank" className={classes.btnText}>
like image 187
ummahusla Avatar answered Mar 27 '26 18:03

ummahusla



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!