How to attach files in a basic plage

Dear Colleagues,

I created a basic page and I would like to attach a file to the text, so that when I click on a specific word, the file attached is automatically downloaded. How can I do it?

Thank you in advance.


Hey @vbaldass,

You can use the HTML download attribute to specify that the target will be downloaded when a user clicks on the hyperlink. For implementing this you must use an anchor tag that specifies the href (link of the file) along with the download attribute.

Refer the below code snippet as an example :

<a href="source_of_the_file" download>

This will allow you to place the link with your text in the content type (Basic page in your case) and the download attribute will enable the file/attachment/image etc to be downloaded when the user clicks on the link.

To embed the same on your webpage you must follow the following steps :

  • Go to the Edit of the content

  • In there go to Source

  • Embed the code (anchor tag) in the source as basic plain HTML

  • SAVE

Refer the Screenshot below :

NOTE : You must be mindful of the source file/attachment/image etc you are using, it should be either hosted on a server or on webdav.

I hope this helps.


1 Like

Thank you so much Prakhar for your help!