avatar
class avatar extends controller
Controller for /download/avatar/{file} routes
Properties
protected service | $cache | from controller | |
protected driver_interface | $db | from controller | |
protected storage | $storage | from controller | |
protected Request | $symfony_request | from controller | |
protected config | $config | ||
protected array | $allowed_extensions |
Methods
__construct(service $cache, config $config, driver_interface $db, storage $storage, Request $symfony_request)
Constructor
Response
handle(string $file)
Handler
bool
is_allowed(string $file)
If the user is allowed to download the file
void
prepare(StreamedResponse $response, string $file)
Prepare response
string
decode_filename(string $file)
Decode avatar filename
Details
at line 45
__construct(service $cache, config $config, driver_interface $db, storage $storage, Request $symfony_request)
Constructor
at line 55
Response
handle(string $file)
Handler
at line 65
protected bool
is_allowed(string $file)
If the user is allowed to download the file
in
controller at line 111
protected bool
file_exists(string $file)
Check if file exists
at line 99
protected void
prepare(StreamedResponse $response, string $file)
Prepare response
in
controller at line 183
protected void
file_gc()
Garbage Collection
at line 80
protected string
decode_filename(string $file)
Decode avatar filename