add handling of file parameters

This commit is contained in:
steckbrief 2017-12-02 00:13:43 +01:00
parent c906747e7a
commit 075f05aaf9

View file

@ -86,6 +86,22 @@ function getHeaderValue($headerName) {
return $_SERVER[$headerName];
}
function getFileParameter($parameterName) {
return $_FILES[$parameterName];
}
function getOptionalFileParameter($parameterName, $default = NULL) {
$parameter = getFileParameter($parameterName);
return handleOptionalParameter($parameter, $default);
}
function getMandatoryFileParameter($parameterName, $message = '', $json = false) {
$parameter = getFileParameter($parameterName);
return handleMandatoryParameter($parameterName, $parameter, $message, $json);
}
function getPostParameter($parameterName) {
return $_POST[$parameterName];
}