The default index.php
file should look like following.
error_reporting(E_ALL | E_STRICT);
require('UploadHandler.php');
$upload_handler = new UploadHandler();
In your
index.php
file before the following function call
$upload_handler = new UploadHandler();
add the following code...
$options = array(
// This option will disable creating thumbnail images and will not create that extra folder.
// However, due to this, the images preview will not be displayed after upload
'image_versions' => array()
);
and then CHANGE the UploadHandler()
function call to the pass the option as follows
$upload_handler = new UploadHandler($options);
Short Explanation
In UploadHandler.php
file there are default options. One of which is 'image_versions'
. This option sets all relevant options to create server side thumbnail image.
With the above explained changes we are overwriting the 'image_versions'
option to be an empty array (which is same as not having this option).
This disables the server side thumbnail creation.