Using Dropzone, I am not able to get the details of the file passed.
I created two upload pages. The page using an input tag works fine. The page using Dropzone does not.
It will not return any $_FILES information. The dropzone page:
<html>
<head>
<title>Competition Information</title>
<link rel="STYLESHEET" HREF="all_pages.css" TYPE="Text/css">
<link rel="STYLESHEET" HREF="dropzone.css" TYPE="Text/css">
</head>
<body>
<script src="dropzone.js"></script>
<p class=PageTitle align=center>Uploading a competition Entry</P>
<form action="upload_handler.php" class="dropzone" id="my-awesome-dropzone">
<!-- <script>Dropzone.options.myAwesomeDropzone = {
paramName: "userfile", // The name that will be used to transfer the file
};
</script> -->
<div class="fallback">
<input name="file" type="file" multiple >
</div>
Enter Name of competitor: <input type=text value="CompName">
<input type=submit value="Submit Entry">
</form>
</body>
</html>
The file name is commented out. Just using the default 'file'.
The handler page:
<?php
$uploaddir = 'ups/';
$uploadfile = $uploaddir . basename($_FILES['file']['name']);
echo $uploadfile;
echo '<br>Tempname is '.$_FILES['file']['tmp_name'];
echo '<pre>';
# if (move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile)) {
# echo "File is valid, and was successfully uploaded.\n";
#} else {
# echo "Possible file upload attack!\n";
#}
move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile);
echo 'Here is some more debugging info:';
print_r($_FILES);
print "</pre>";
?>
The print_r($_FILES) returns no values from the dropzone page. Any help would be gratefully received - thanks.