Working with pdf (excel, word,...) file links

Hi,

I was wondering what’s best practice to work with files.

Usecase:

  • Client is managing website
  • Client wants to link a download PDF link in a text block or something

If they use the “file.url” (/media/../654654-54654/) link I can provide via the panel it sometime happens that the link changes so not a good idea to have it hardcoded in text.

If they use /page/file.pdf without the /media/../654654-54654/ stuff it all works but I’m wondering it that has any downside and, if not, If there is a way to generate this link in an info field for them to copy paste.

Any ideas?

Cheers,
Sam

You can set the info prop in a files section

  files:
    type: files
    info: "{{ file.id }}"
1 Like

wow, that easy :man_facepalming: Do you by any chance have an idea @pixellijn if this way of linking has a downside or it’s all good? :sweat_smile:

Should be fine. Of course, when the file is deleted/renamed, the link won’t work anymore, but that is a general problem you have with all links.

1 Like