File download with middleman (PDF/XLSX/Zip...)

I (middleman newbie) am trying to add some static pdf/xlsx files. I tried to store them in the image directory and in /, though middleman keeps on reporting “file not found”. I guess that I have to tell Middleman somehow that .pdf, .xlsx are valid file types that are not supposed to be ignored. Where does Middleman do this kind of config? Is this the right approach?

Thanx
Dorthe

Welcome @luebbert42

Here is an exmaple with a .pdf file


Then in your view

= link_to 'Download', '/assets/myfile-cv.pdf'

You can read the doc for helpers

https://middlemanapp.com/advanced/asset_pipeline/#helpers

Cheers!

2 Likes

As far as I can see you are doing nothing special to make this work, do you? You just saved the pdf in your asset directory as you would do with a png and it works out of the box. Am I missing something?

Thanx