I would like to know how I can make File field type display the upload as a download link, instead of having a link. So that user can just click and it will download).

The file field type, I added to a custom Content Type, which I created programmatically through a module.

Currently it looks like below, when I click the link, it takes to the uploaded file page. I would like to have it download instead.

Or maybe is there a way to change the view or add additional view to File types for download? or maybe change view for Content Type where it displays the Download link for the file?

enter image description here

1 Answer 1


If you don't need to update the link tag, then just use the download attribute, it should do the trick.

I've wrote a tiny Fiddle for you https://jsfiddle.net/45ug9p7t/1/

Keep in mind that not every browser has implemented this, check it out

  • 1
    The link will change actually, I have found File Download Link module which allwos this
    – mstrdruids
    Dec 12, 2019 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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