summaryrefslogtreecommitdiffstats
path: root/httpserver/resources/local/upload.php
diff options
context:
space:
mode:
authorKrzysztof Gajewski <krzysztof.gajewski@nokia.com>2021-02-24 14:46:37 +0100
committerKrzysztof Gajewski <krzysztof.gajewski@nokia.com>2021-03-02 15:56:29 +0100
commitb1961a04c191ebbc726de507d98c85966b7a6a71 (patch)
treec15b1ba29407d79740f02734c387695bb01a7026 /httpserver/resources/local/upload.php
parent441945e8adf7e3adc524d761e61c179c83e9888d (diff)
Add JWT support in HTTP/HTTPS based locations - pnf-simulator1.0.5
- update containers to version 1.0.5 Issue-ID: DCAEGEN2-2536 Signed-off-by: Krzysztof Gajewski <krzysztof.gajewski@nokia.com> Change-Id: If6b938db03fc8b5e5a5a6435ad0559061fa5b4ad
Diffstat (limited to 'httpserver/resources/local/upload.php')
-rw-r--r--httpserver/resources/local/upload.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/httpserver/resources/local/upload.php b/httpserver/resources/local/upload.php
new file mode 100644
index 0000000..31dbaa3
--- /dev/null
+++ b/httpserver/resources/local/upload.php
@@ -0,0 +1,18 @@
+<?PHP
+ if(!empty($_FILES['uploaded_file']))
+ {
+ $dirpath = "";
+ $path = $dirpath . basename( $_FILES['uploaded_file']['name']);
+ $filename = $_FILES['uploaded_file']['name'];
+ $filepath = '/usr/local/apache2/htdocs/'.$path;
+
+ if (file_exists($filepath)) {
+ echo "The file $filename exists" .PHP_EOL;
+ } else if(move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $path)) {
+ echo "The file ". basename( $_FILES['uploaded_file']['name']).
+ " has been uploaded" .PHP_EOL;
+ } else{
+ echo "There was an error uploading the file, please try again!" .PHP_EOL;
+ }
+ }
+?>