diff options
Diffstat (limited to 'utils/upload.php')
| -rw-r--r-- | utils/upload.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/utils/upload.php b/utils/upload.php index da848eb..602ed69 100644 --- a/utils/upload.php +++ b/utils/upload.php @@ -9,11 +9,12 @@ } if (!empty($_FILES['file'])) { - $path = "/var/www/repo/". $_POST['arch'] . "/"; - $path = $path . basename($_FILES['file']['name']); + $path = "/var/www/repo/". $_POST['arch'] . "/"; + $file_name = urldecode($_FILES['file']['name']); + $path = $path . basename($file_name); if (move_uploaded_file($_FILES['file']['tmp_name'], $path)) { - echo "The file " . basename( $_FILES['file']['name']) . " has been uploaded"; + echo "The file " . basename($file_name) . " has been uploaded"; } else { echo "There was an error uploading the file, please try again!"; } |
