Just save images into images/editor

This commit is contained in:
slawkens 2023-02-02 18:29:41 +01:00
parent dd6581f7f7
commit 708aa2d72f
3 changed files with 2 additions and 3 deletions

View File

@ -15,7 +15,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
return;
}
$imageFolder = USER . 'image_uploads/';
$imageFolder = BASE . 'images/editor';
reset ($_FILES);
$temp = current($_FILES);
@ -43,7 +43,7 @@ if (is_uploaded_file($temp['tmp_name'])) {
move_uploaded_file($temp['tmp_name'], $fileToWrite);
$returnPathToImage = BASE_URL . 'user/image_uploads/' . $randomName;
$returnPathToImage = BASE_URL . 'images/editor/' . $randomName;
echo json_encode(['location' => $returnPathToImage]);
} else {
// Notify editor that the upload failed

View File

@ -67,7 +67,6 @@ const PLUGINS = BASE . 'plugins/';
const TEMPLATES = BASE . 'templates/';
const TOOLS = BASE . 'tools/';
const VENDOR = BASE . 'vendor/';
const USER = BASE . 'user/';
// menu categories
const MENU_CATEGORY_NEWS = 1;

0
images/editor/index.html Normal file
View File