Just a quick comment to hopefully help someone.
The contribution is great, but theres a bug if you try to upload images with a space in them. You get an invalid hash error. To fix this simply strip out the spaces from the filenames.
This can be done in the code.
in file: admin/includes/classes/upload.php about line 41 change
if (isset($_FILES[$this->file])) {
$file = array('name' => $_FILES[$this->file]['name'],
'type' => $_FILES[$this->file]['type'],
'size' => $_FILES[$this->file]['size'],
'tmp_name' => $_FILES[$this->file]['tmp_name']);
} elseif (isset($HTTP_POST_FILES[$this->file])) {
$file = array('name' => $HTTP_POST_FILES[$this->file]['name'],
'type' => $HTTP_POST_FILES[$this->file]['type'],
'size' => $HTTP_POST_FILES[$this->file]['size'],
'tmp_name' => $HTTP_POST_FILES[$this->file]['tmp_name']);
}
to
if (isset($_FILES[$this->file])) {
$newFilename = str_replace(" ", "-", $HTTP_POST_FILES[$this->file]['name']);
$file = array('name' => $newFilename,
'type' => $_FILES[$this->file]['type'],
'size' => $_FILES[$this->file]['size'],
'tmp_name' => $_FILES[$this->file]['tmp_name']);
} elseif (isset($HTTP_POST_FILES[$this->file])) {
$file = array('name' => $newFilename,
'type' => $HTTP_POST_FILES[$this->file]['type'],
'size' => $HTTP_POST_FILES[$this->file]['size'],
'tmp_name' => $HTTP_POST_FILES[$this->file]['tmp_name']);
}
And any spaces in the filename will be changed to a dash which fixes the bug.