upload
Table of Contents
- get_max_upload_size() : int
- Calculates the actual maximum upload size supported by the server Returns a file size limit in bytes based on the PHP upload_max_filesize and post_max_size
- parse_size() : int
- Parses a PHP size to an integer
- upload_check_svg() : array<string|int, int>
- Checks an uploaded SVG file to make sure it's (at least somewhat) safe.
- getsvgsize() : array<string|int, int>
- Calculates the size of the specified SVG file.
Functions
get_max_upload_size()
Calculates the actual maximum upload size supported by the server Returns a file size limit in bytes based on the PHP upload_max_filesize and post_max_size
get_max_upload_size() : int
Tags
Return values
int —The maximum upload size supported bythe server, in bytes.
parse_size()
Parses a PHP size to an integer
parse_size(string $size) : int
Parameters
- $size : string
-
The size to parse.
Tags
Return values
int —The number of bytees represented by the specified size string.
upload_check_svg()
Checks an uploaded SVG file to make sure it's (at least somewhat) safe.
upload_check_svg(string $temp_filename) : array<string|int, int>
Sends an error to the client if a problem is found.
Parameters
- $temp_filename : string
-
The filename of the SVG file to check.
Return values
array<string|int, int> —The size of the SVG image.
getsvgsize()
Calculates the size of the specified SVG file.
getsvgsize(string $svgFilename) : array<string|int, int>
Parameters
- $svgFilename : string
-
The filename to calculate the size of.
Return values
array<string|int, int> —The width and height respectively of the specified SVG file.