Merge pull request #222 from jabourne/patch-2

Update um-image-upload.php
This commit is contained in:
Champ Camba
2017-01-25 08:55:45 +08:00
committed by GitHub
+2 -2
View File
@@ -35,7 +35,7 @@ if(isset($_FILES[$id]['name'])) {
if(!is_array($_FILES[$id]['name'])) {
$temp = $_FILES[$id]["tmp_name"];
$file = $_FILES[$id]["name"];
$file = $id."-".$_FILES[$id]["name"];
$file = sanitize_file_name($file);
$ext = strtolower( pathinfo($file, PATHINFO_EXTENSION) );
@@ -55,4 +55,4 @@ if(isset($_FILES[$id]['name'])) {
} else {
$ret['error'] = __('A theme or plugin compatibility issue','ultimatemember');
}
echo json_encode($ret);
echo json_encode($ret);