class plupload
This class handles all server-side plupload functions
Methods
|
__construct(string $phpbb_root_path, config $config, request_interface $request, user $user, ini $php_ini, guesser $mimetype_guesser)
Constructor. |
||
| array|null |
handle_upload(string $form_name)
Plupload allows for chunking so we must check for that and assemble the whole file first before performing any checks on it. |
|
| null |
configure(service $cache, template $template, string $s_action, int $forum_id, int $max_files)
Fill in the plupload configuration options in the template |
|
| bool |
is_active()
Checks whether the page request was sent by plupload or not |
|
| bool |
is_multipart()
Returns whether the current HTTP request is a multipart request. |
|
| null |
emit_error(int $code, string $msg)
Sends an error message back to the client via JSON response |
|
| string |
generate_filter_string(service $cache, string $forum_id)
Looks at the list of allowed extensions and generates a string appropriate for use in configuring plupload with |
|
| string |
generate_resize_string()
Generates a string that is used to tell plupload to automatically resize files before uploading them. |
|
| int |
get_chunk_size()
Checks various php.ini values and the maximum file size to determine the maximum size chunks a file can be split up into for upload |
|
| null |
set_upload_directories(string $upload_directory, string $temporary_directory)
Sets the upload directories to the specified paths |
Details
at line 73
public
__construct(string $phpbb_root_path, config $config, request_interface $request, user $user, ini $php_ini, guesser $mimetype_guesser)
Constructor.
at line 95
public array|null
handle_upload(string $form_name)
Plupload allows for chunking so we must check for that and assemble the whole file first before performing any checks on it.
at line 155
public null
configure(service $cache, template $template, string $s_action, int $forum_id, int $max_files)
Fill in the plupload configuration options in the template
at line 180
public bool
is_active()
Checks whether the page request was sent by plupload or not
at line 190
public bool
is_multipart()
Returns whether the current HTTP request is a multipart request.
at line 205
public null
emit_error(int $code, string $msg)
Sends an error message back to the client via JSON response
at line 227
public string
generate_filter_string(service $cache, string $forum_id)
Looks at the list of allowed extensions and generates a string appropriate for use in configuring plupload with
at line 263
public string
generate_resize_string()
Generates a string that is used to tell plupload to automatically resize files before uploading them.
at line 284
public int
get_chunk_size()
Checks various php.ini values and the maximum file size to determine the maximum size chunks a file can be split up into for upload
at line 397
public null
set_upload_directories(string $upload_directory, string $temporary_directory)
Sets the upload directories to the specified paths