FILEUP



LOG | FILES | OVERVIEW


F diff --git a/loggedin.php b/loggedin.php --- a/loggedin.php +++ b/loggedin.php
</div>
- <form id="upload_form" style="display:none;" action="php/upload.php" method="post" enctype="multipart/form-data">
+ <form id="upload_form" style="display:none;" action="php/upload.php" method="post">
<input id="filename" name="filename">
<input type="file" name="the_file" id="the_file">
</form>
F diff --git a/php/configuration.php b/php/configuration.php --- a/php/configuration.php +++ b/php/configuration.php
$database_password="parola123";
$database_location="localhost";
- $storage_root = "/tmp/fileup_storage";
+ $storage_root = "/tmp";
}
F diff --git a/php/upload.php b/php/upload.php --- a/php/upload.php +++ b/php/upload.php
exit(1);
}
- echo "adsf";
-
$file = $_FILES["the_file"];
$filename= $_POST["filename"];
http_response_code(400);
exit(0);
}
- error_log($file['tmp_name']);
move_uploaded_file($file['tmp_name'], "$storage_root/$codename");
http_response_code(200);