class filespec
Responsible for holding all file relevant information, as well as doing file-specific operations.
The {@link fileupload fileupload class} can be used to upload several files, each of them being this object to operate further on.
Properties
| $filename | ||
| $realname | ||
| $uploadname | ||
| $mimetype | ||
| $extension | ||
| $filesize | ||
| $width | ||
| $height | ||
| $image_info | ||
| $destination_file | ||
| $destination_path | ||
| $file_moved | ||
| $init_error | ||
| $local | ||
| $error | ||
| $upload |
Methods
|
filespec($upload_ary, $upload_namespace, guesser $mimetype_guesser = null, plupload $plupload = null)
File Class |
||
|
clean_filename(real|unique|unique_ext $mode = 'unique', string $prefix = '', string $user_id = '')
Cleans destination filename |
||
|
get($property)
Get property from file object |
||
| true |
is_image()
Check if file is an image (mimetype) |
|
| true |
is_uploaded()
Check if the file got correctly uploaded |
|
|
remove()
Remove file |
||
| static string |
get_extension(string $filename)
Get file extension |
|
| string |
get_mimetype(string $filename)
Get mimetype |
|
|
get_filesize($filename)
Get filesize |
||
|
check_content($disallowed_content)
Check the first 256 bytes for forbidden content |
||
|
move_file(string $destination, bool $overwrite = false, bool $skip_image_check = false, string $chmod = false)
Move file to destination folder The phpbbrootpath variable will be applied to the destination path |
||
|
additional_checks()
Performing additional checks |
Details
at line 65
public
filespec($upload_ary, $upload_namespace, guesser $mimetype_guesser = null, plupload $plupload = null)
File Class
at line 110
public
clean_filename(real|unique|unique_ext $mode = 'unique', string $prefix = '', string $user_id = '')
Cleans destination filename
at line 155
public
get($property)
Get property from file object
at line 170
public true
is_image()
Check if file is an image (mimetype)
at line 180
public true
is_uploaded()
Check if the file got correctly uploaded
at line 200
public
remove()
Remove file
at line 214
static public string
get_extension(string $filename)
Get file extension
at line 233
public string
get_mimetype(string $filename)
Get mimetype
at line 251
public
get_filesize($filename)
Get filesize
at line 260
public
check_content($disallowed_content)
Check the first 256 bytes for forbidden content
at line 295
public
move_file(string $destination, bool $overwrite = false, bool $skip_image_check = false, string $chmod = false)
Move file to destination folder The phpbbrootpath variable will be applied to the destination path
at line 439
public
additional_checks()
Performing additional checks