Tool
Tool

Reputation: 12488

How to link to Symfony2's uploaded files?

I have my files uploaded in web/uploads/scripts.

How can I create a link in twig to make the file downloadable?

I checked path(), and asset() but it doesn't help.

Upvotes: 0

Views: 127

Answers (1)

Wouter J
Wouter J

Reputation: 41934

You can use asset('web/uploades/script/watheveryouwant.pdf') to create a link to that resource. Learn more about the asset() function in the docs.

Upvotes: 1

Related Questions