Search code examples
meteormeteor-collection2

how to display the "URL" of a zip file as a download button?


am using aldeed:collection2 package for my collection and one of the element in the documents is the URL of a zip file.

I already fetched the URL "item.file" but I want to provide that URL as a button, once clicked the download will start.

How do i do this?

thanks


Solution

  • If it's a .zip file, you just need to wrap it in an <a> tag:

    <a class="btn btn-primary" href="{{item.file}}">Click to Download</a>
    

    Note that I'm using Bootstrap classes to make it look like a button.