Nate
Nate

Reputation: 1875

Download File Link using iron-router version 1.0.0-pre2

I am using bootstrap-3, collection-fs and iron-router. I have successfully created a download button before, but since upgrading to iron-router version 1.0.0-pre2, I have not been able to successfully replicate the download button.

<a href="{{this.url download=true}}" class="btn btn-primary">Download</a> 

where this.url provides the url to the file. However iron-router tries to route the entire app to the file location rather then downloading the file. Any thoughts?

Upvotes: 0

Views: 157

Answers (1)

yoK0
yoK0

Reputation: 325

Its because the route should be server side route Check out this thread How to serve a file using iron router or meteor itself?

Upvotes: 1

Related Questions