This resolves #1
This commit is contained in:
parent
5c6088a45e
commit
64f9d3470a
|
@ -9,9 +9,11 @@ if ($_SERVER["REQUEST_URI"] == "/robot.txt") { die("User-agent: *\nDisallow: /")
|
|||
|
||||
if (isset($_POST['key'])) {
|
||||
if ($_POST['key'] == $key) {
|
||||
$target = getcwd() . "/u/" . $_POST['name'] . "." . end(explode(".", $_FILES["d"]["name"]));
|
||||
$parts = explode(".", $_FILES["d"]["name"]);
|
||||
$target = getcwd() . "/u/" . $_POST['name'] . "." . end($parts);
|
||||
if (move_uploaded_file($_FILES['d']['tmp_name'], $target)) {
|
||||
echo $uploadhost . end(explode("/u/", $target));
|
||||
$target_parts = explode("/u/", $target);
|
||||
echo $uploadhost . end($target_parts);
|
||||
} else {
|
||||
echo "Sorry, there was a problem uploading your file.";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue