Function __global->add_filedump_file
Definitions
sources/filedump.php
- Add a filedump file to the system, moving in the file and adding a description to the database.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
---|---|---|---|---|---|---|---|
$subpath | string | No | No | required parameter | N/A | N/A | Whether it is being stored under uploads/filedump |
&$filename | string | Yes | No | required parameter | N/A | N/A | The filename |
$tmp_path | string | No | No | required parameter | N/A | N/A | The temporary file path |
$description | string | No | No | Blank (empty string) | N/A | N/A | The description |
$plupload_based | ?boolean | No | No | Null | N/A | N/A | Whether this is a Plupload or similar (i.e. from a faked $_FILES-array-row) (null: work out from environment) |
$check_permissions | boolean | No | No | True | N/A | N/A | Check access permissions |
$conflict_action | ?ID_TEXT | No | No | Null | overwrite ignore | N/A | Specify what should be done if a file with the same name already exists (null: return as a conflict error) |
Returns
- Map: Information about the status of the filedump add
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Add a filedump file to the system, moving in the file and adding a description to the database.
*
* @param string $subpath Whether it is being stored under uploads/filedump
* @param string $filename The filename
* @param string $tmp_path The temporary file path
* @param string $description The description
* @param ?boolean $plupload_based Whether this is a Plupload or similar (i.e. from a faked $_FILES-array-row) (null: work out from environment)
* @param boolean $check_permissions Check access permissions
* @param ?ID_TEXT $conflict_action Specify what should be done if a file with the same name already exists (null: return as a conflict error)
* @set overwrite ignore
* @return array Map: Information about the status of the filedump add
*/
function add_filedump_file(string $subpath, string &$filename, string $tmp_path, string $description = '', ?bool $plupload_based = null, bool $check_permissions = true, ?string $conflict_action = null) : array
* Add a filedump file to the system, moving in the file and adding a description to the database.
*
* @param string $subpath Whether it is being stored under uploads/filedump
* @param string $filename The filename
* @param string $tmp_path The temporary file path
* @param string $description The description
* @param ?boolean $plupload_based Whether this is a Plupload or similar (i.e. from a faked $_FILES-array-row) (null: work out from environment)
* @param boolean $check_permissions Check access permissions
* @param ?ID_TEXT $conflict_action Specify what should be done if a file with the same name already exists (null: return as a conflict error)
* @set overwrite ignore
* @return array Map: Information about the status of the filedump add
*/
function add_filedump_file(string $subpath, string &$filename, string $tmp_path, string $description = '', ?bool $plupload_based = null, bool $check_permissions = true, ?string $conflict_action = null) : array