phpBB API Documentation
Class

phpbb\attachment\upload

class upload

Attachment upload class

Methods

__construct(auth $auth, service $cache, config $config, upload $files_upload, language $language, guesser $mimetype_guesser, dispatcher $phpbb_dispatcher, plupload $plupload, user $user, $phpbb_root_path $phpbb_root_path)

Constructor for attachments upload class

array upload(string $form_name, int $forum_id, bool $local = false, string $local_storage = '', bool $is_message = false, array $local_filedata = array())

Upload Attachment - filedata is generated here Uses upload class

Details

at line 82
public __construct(auth $auth, service $cache, config $config, upload $files_upload, language $language, guesser $mimetype_guesser, dispatcher $phpbb_dispatcher, plupload $plupload, user $user, $phpbb_root_path $phpbb_root_path)

Constructor for attachments upload class

Parameters

auth $auth
service $cache
config $config
upload $files_upload
language $language
guesser $mimetype_guesser
dispatcher $phpbb_dispatcher
plupload $plupload
user $user
$phpbb_root_path $phpbb_root_path

at line 109
public array upload(string $form_name, int $forum_id, bool $local = false, string $local_storage = '', bool $is_message = false, array $local_filedata = array())

Upload Attachment - filedata is generated here Uses upload class

Parameters

string $form_name The form name of the file upload input
int $forum_id The id of the forum
bool $local Whether the file is local or not
string $local_storage The path to the local file
bool $is_message Whether it is a PM or not
array $local_filedata An file data object created for the local file

Return Value

array File data array