gupalo/symfony-response-helpers

Symfony Response Helpers

1.1.0 2022-01-23 18:57 UTC

This package is auto-updated.

Last update: 2024-03-23 23:29:00 UTC


README

PublicFileResponse

Create BinaryFileResponse with correct headers for static files.

PublicFileResponse::create($dir, $slug)

$slug can be filename, can be part of url like:

* `/path/to/file.jpg?key=value&k2=v2#somehash`
* `path/without/left/slash.png`

Other

See tests.