Browse Source

Changes I forgot about

master
Markus Becker 2 years ago
parent
commit
421b59bb5b
  1. 9
      api/index.php
  2. BIN
      interface/exec/.pulllib.php.swp

9
api/index.php

@ -54,7 +54,13 @@ if (isset($_POST["function"])){
apiprint($valid);
if ($valid){
$dir = getFolderArray()[ (int) $_POST["target"] ];
$uploaddir = "../data/" . $dir . "/";
$uploaddir = "/home/wms/apewms/data/" . $dir . "/";
if (!file_exists($uploaddir)) {
apiprint("creating dir: " . $uploaddir . " => " . realpath($uploaddir));
mkdir($uploaddir, 0777, true);
} else {
apiprint("dir exists");
}
$filename = basename($_FILES['file']['name']);
$uploadfile = $uploaddir . $filename;
apiprint("trying to upload");
@ -84,6 +90,7 @@ if (isset($_POST["function"])){
apilog("log","uploaded: ". mysql_real_escape_string($filename));
} else {
apiprint("upload failed");
apiprint("due to ".$_FILES['file']['error']);
apilog("error", "failed uploading file (api)");
}
}

BIN
interface/exec/.pulllib.php.swp

Loading…
Cancel
Save