1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

Merge pull request #5274 from rubencm/ticket/14285

[ticket/14285] Move downloads to controller
This commit is contained in:
Marc Alexander
2021-05-28 07:17:15 +02:00
committed by GitHub
26 changed files with 1037 additions and 1335 deletions

View File

@@ -56,6 +56,7 @@ services:
class: phpbb\avatar\driver\upload
arguments:
- '@config'
- '@controller.helper'
- '%core.root_path%'
- '%core.php_ext%'
- '@storage.avatar'

View File

@@ -82,3 +82,28 @@ services:
arguments:
tags:
- { name: storage.provider }
# Controllers
storage.controller.avatar:
class: phpbb\storage\controller\avatar
arguments:
- '@cache'
- '@config'
- '@dbal.conn'
- '@storage.avatar'
- '@symfony_request'
storage.controller.attachment:
class: phpbb\storage\controller\attachment
arguments:
- '@auth'
- '@cache'
- '@config'
- '@content.visibility'
- '@dbal.conn'
- '@dispatcher'
- '@language'
- '@request'
- '@storage.attachment'
- '@symfony_request'
- '@user'

View File

@@ -35,3 +35,7 @@ phpbb_report_routing:
phpbb_ucp_routing:
resource: ucp.yml
prefix: /user
phpbb_storage_routing:
resource: storage.yml
prefix: /download

View File

@@ -0,0 +1,11 @@
phpbb_storage_avatar:
path: /avatar/{file}
defaults:
_controller: storage.controller.avatar:handle
phpbb_storage_attachment:
path: /attachment/{file}
defaults:
_controller: storage.controller.attachment:handle
requirements:
id: \d+