summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2017-12-02 00:13:43 +0100
committersteckbrief <steckbrief@chefmail.de>2017-12-02 00:13:43 +0100
commit075f05aaf9dfccc4a8a1e5741462ec4ee42ae743 (patch)
treef265477eb4fb0bbb22b35406b8dedc1355b4ad09
parentc906747e7aef1308b956a62c911d726065a39ad9 (diff)
add handling of file parameters
Diffstat (limited to '')
-rw-r--r--functions.http.inc.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/functions.http.inc.php b/functions.http.inc.php
index 1cdbea7..19f3e9e 100644
--- a/functions.http.inc.php
+++ b/functions.http.inc.php
@@ -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];
}