attachment
class attachment extends controller
Controller for /download/attachment/{id} routes
Properties
protected service | $cache | from controller | |
protected driver_interface | $db | from controller | |
protected extension_guesser | $extension_guesser | from controller | |
protected storage | $storage | from controller | |
protected Request | $symfony_request | from controller | |
protected auth | $auth | ||
protected config | $config | ||
protected content_visibility | $content_visibility | ||
protected dispatcher_interface | $dispatcher | ||
protected language | $language | ||
protected request | $request | ||
protected user | $user |
Methods
Constructor
Prepare response
Handle attachments
Remove non valid characters https://github.com/symfony/http-foundation/commit/c7df9082ee7205548a97031683bc6550b5dc9551
Handles authentication when downloading attachments from a post or topic
Handles authentication when downloading attachments from PMs
Checks whether a user can download from a particular PM
Increments the download count of all provided attachments
Check if downloading item is allowed FIXME (See: https://tracker.phpbb.com/browse/PHPBB3-15264 and http://area51.phpbb.com/phpBB/viewtopic.php?f=81&t=51921)
Details
at line 77
__construct(auth $auth, service $cache, config $config, content_visibility $content_visibility, driver_interface $db, dispatcher_interface $dispatcher, extension_guesser $extension_guesser, language $language, request $request, storage $storage, Request $symfony_request, user $user)
Constructor
in
controller at line 73
Response
handle(string $file)
Handler
in
controller at line 104
protected bool
is_allowed(string $file)
If the user is allowed to download the file
in
controller at line 116
protected bool
file_exists(string $file)
Check if file exists
at line 306
protected void
prepare(StreamedResponse $response, string $file)
Prepare response
in
controller at line 186
protected void
file_gc()
Garbage Collection
at line 96
Response
handle_attachment(int $id, string $filename)
Handle attachments
at line 296
protected
filenameFallback($filename)
Remove non valid characters https://github.com/symfony/http-foundation/commit/c7df9082ee7205548a97031683bc6550b5dc9551
at line 322
protected void
phpbb_download_handle_forum_auth(int $topic_id)
Handles authentication when downloading attachments from a post or topic
at line 365
protected void
phpbb_download_handle_pm_auth(int $msg_id)
Handles authentication when downloading attachments from PMs
at line 399
protected bool
phpbb_download_check_pm_auth(int $msg_id)
Checks whether a user can download from a particular PM
at line 425
protected void
phpbb_increment_downloads(int $id)
Increments the download count of all provided attachments
at line 437
protected bool
download_allowed()
Check if downloading item is allowed FIXME (See: https://tracker.phpbb.com/browse/PHPBB3-15264 and http://area51.phpbb.com/phpBB/viewtopic.php?f=81&t=51921)