enter image description hereI 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

  • 2
    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 Dec 5 '17 at 15:50
  • 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 Dec 5 '17 at 16:16

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.

  • 2
    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 Dec 5 '17 at 16:28
  • Right, the answer might be wrong. I simply assumed it’s an asset element because of the file path /uploads/files/… @RobinSchambach – carlcs Dec 5 '17 at 16:41
  • 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 Dec 5 '17 at 16:45
  • It only does so when siteUrl is setup and set to a fully qualified URL. – carlcs Dec 5 '17 at 16:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.