<p>You can replace a file directly in the control panel. Navigate to Assets, select the file you want to replace and then click the cog icon to select the “Replace file” action.</p>

<p><img src="https://i.sstatic.net/lCWpb.png" width="384"></p>

CC BY-SA 3.0
2017-12-05T16:28:16.107Z
But this only works if the creator used that method. If the creator of the site just included a hard link to the file or passed a generated link from a plugin it won't work
Robin Schambach
CC BY-SA 3.0
2017-12-05T16:41:04.630Z
Right, the answer might be wrong. I simply assumed it’s an asset element because of the file path /uploads/files/… @RobinSchambach
carlcs
CC BY-SA 3.0
2017-12-05T16:45:05.280Z
I did so too, but I thought craft always adds the site url in the `getUrl` function but maybe I'm wrong and there is a config variable to remove/change that behavior
Robin Schambach
CC BY-SA 3.0
2017-12-05T16:49:59.720Z
It only does so when `siteUrl` is setup and set to a fully qualified URL.
carlcs
CC BY-SA 3.0
2017-12-05T16:24:37.477Z
2017-12-05T16:24:37.477Z
carlcs
<p><a href="https://i.sstatic.net/BJ8G0.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/BJ8G0.jpg" alt="enter image description here"></a>I have inherited a Craft website and need to update an existing URL, it will open a PDF document, so I need to replace an updated PDF</p>

<p>I have very basic Craft knowledge so need assistance.  I have added a Screenshot below showing the inforamtion behind the link which I hope helps</p>

CC BY-SA 3.0
2017-12-05T15:50:51.183Z
We need much more information in order to help you. How is the link generated, is it a plugin route or is it the cp asset url? Maybe you could provide us the template where the link is generated so we can assume where it comes from. Otherwise there a plenty of ways how the creator did it
Robin Schambach
CC BY-SA 3.0
2017-12-05T16:16:40.287Z
Your template, not your html. But it seems like it's a hard coded link to a specific file. So you might have to rename the file or create a custom route
Robin Schambach
<url><link>
I need to update an existing URL
# I need to update an existing URL

(Asked by: username_0 on 2017-12-05)

[![enter image description here](https://i.sstatic.net/BJ8G0.jpg)](https://i.sstatic.net/BJ8G0.jpg)I have inherited a Craft website and need to update an existing URL, it will open a PDF document, so I need to replace an updated PDF

I have very basic Craft knowledge so need assistance. I have added a Screenshot below showing the inforamtion behind the link which I hope helps

**Tags:** url, link

> **Comments:**
> **username_1**: We need much more information in order to help you. How is the link generated, is it a plugin route or is it the cp asset url? Maybe you could provide us the template where the link is generated so we can assume where it comes from. Otherwise there a plenty of ways how the creator did it  
> **username_1**: Your template, not your html. But it seems like it's a hard coded link to a specific file. So you might have to rename the file or create a custom route  

---

## 1 answers

### Answer by username_2 on 2017-12-05. Score: 2

You can replace a file directly in the control panel. Navigate to Assets, select the file you want to replace and then click the cog icon to select the “Replace file” action.

![](https://i.sstatic.net/lCWpb.png)

> **Comments:**
> **username_1**: But this only works if the creator used that method. If the creator of the site just included a hard link to the file or passed a generated link from a plugin it won't work  
> **username_2**: Right, the answer might be wrong. I simply assumed it’s an asset element because of the file path /uploads/files/… @RobinSchambach  
> **username_1**: I did so too, but I thought craft always adds the site url in the `getUrl` function but maybe I'm wrong and there is a config variable to remove/change that behavior  
> **username_2**: It only does so when `siteUrl` is setup and set to a fully qualified URL.  

---

