Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5049

How to make sub folder of public directory accessable in Symfony?

$
0
0

I've got a problem in Symfony PHP Framework.

I have some files that I want to serve so it can be downloaded directly. I put my assets in /public/pdf/. Let says i have book.pdf file, Then if I want to download book.pdf I just type http://host/pdf/book.pdf. But it show :

No route found for "GET /pdf/book.pdf"

I double check if there any misspell, but there are not. The route always use index.php to route.

Then I search on stackoverflow, I found this question. But I must create controller first, then serve it on BinaryResponse. That isn't something that I want.

How can I download directly from the subfolder of public/ directory on Symfony?


Viewing all articles
Browse latest Browse all 5049

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>