]> jfr.im git - uguu.git/commitdiff
Update api.php
authorEric Johansson (neku) <redacted>
Wed, 11 Feb 2015 16:29:54 +0000 (17:29 +0100)
committerEric Johansson (neku) <redacted>
Wed, 11 Feb 2015 16:29:54 +0000 (17:29 +0100)
api.php

diff --git a/api.php b/api.php
index c5ea316f7e982b72c2be443576ff93f5b1926e2f..220691c110f77f67f9b6ed35c32a483b6e6c8761 100644 (file)
--- a/api.php
+++ b/api.php
@@ -7,13 +7,14 @@ if(isset($_GET['d'])) {
         case 'upload':
         //Set the name value to the original filename
        $name = $_FILES['file']['name'];
+       $arg = 'custom_original';
        //If the value name contains a custom name, set the name value
        if(!empty($_POST['name'])){
        $name = $_POST['name'];}
        //If value contains anything, keep original filename
        if(!empty($_POST['randomname'])){
         $name = $_FILES['file']['name'];
-       $arg = 'rand';}
+       $arg = 'random';}
        //Call the save function which sends the file+name
        save_file($_FILES['file']['tmp_name'], $name, $arg);
        break;