이 config.yml을 사용하고 있습니다.Symfony2 KnpLabsGaufrette - 나뭇 가지마다 로컬 파일 시스템 가져 오기 (다운로드 파일)
knp_gaufrette:
adapters:
uploaded_files:
local:
directory: "%kernel.root_dir%/../web/uploads"
create: true
filesystems:
uploaded_files:
adapter: uploaded_files
alias: uploaded_files
이제 나뭇 가지마다 업로드 된 파일에 액세스하려고합니다. 예를 들어, 또한 : 파일이 같은 경로가 있어야
<a href="{{ path('gaufrette_download', {system: 'uploaded_files', file: 'test.txt'}) }}>{{ 'Download' | trans }}</a>
은 ...
http://localhost/web/uploads/test.txt
나는 파일 (들)에 직접 액세스 할 수 있습니다. 컨트롤러가 없습니다 (조치).
이것이 가능합니까? 어떤 아이디어?
감사합니다. 동적 인 것은 없지만 하나의 파일 시스템에 대해 하나의 경로를 정의 할 수 있습니다. 감사. – PatrickB