I was wondering if anyone could help me figure out how to add the following
- multi-file drag and drop feature and to log the location of each file after upload using the below
- "echo "Uploaded to: " . "localhost/site/uploads/" . $_FILES['uploaded_file']["name"];"
- file size limitation to 100MB
- The bonus feature is to have an HTML select multiple Attribute to choose other folders to upload in for example, the current folder is "upload" but I'd like to have another 3 as options to upload into it
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Manual file upload</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="area">
<form enctype="multipart/form-data" action="index.php" method="POST">
<p>Upload your file</p>
<input class="button1" type="file" multiple="multiple" name="uploaded_file"></input><br/>
<input class="button2" type="submit" value="Upload"></input>
</form>
</div>
<?PHP
if(!empty($_FILES['uploaded_file']))
{
$path = "uploads/";
$path = $path . basename( $_FILES['uploaded_file']['name']);
if(move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $path)) {
echo "Uploaded to: " . "loclahost/site/uploads/" . $_FILES['uploaded_file']["name"];
} else{
echo "There was an error uploading the file, please try again!";
}
}
?>
</body>
</html>