Reputation: 5526
I have below code
<Link className={classes.btnText} key= {props.id}
to= {"https://s3.amazonaws.com/pdf/download.pdf" } target="_blank" download>Brochure <span> ↓ </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
Upvotes: 3
Views: 2847
Reputation: 2063
You can use <a>
tag instead
<a href="https://s3.amazonaws.com/pdf/download.pdf" target="_blank" className={classes.btnText}>
Upvotes: 5
Reputation: 2266
Yeah because Link builds all the routes from your home/root path which is localhost:3000 in local dev environment. So that's why its appending to that.
use hyperlink tag <a>
instead
Upvotes: 1