mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 09:44:55 +02:00
Made so it's possible to configure more directories as constants
More flexibility for the user.
This commit is contained in:
@@ -15,7 +15,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
|
||||
return;
|
||||
}
|
||||
|
||||
$imageFolder = BASE . 'images/editor';
|
||||
$imageFolder = BASE . EDITOR_IMAGES_DIR;
|
||||
|
||||
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 . 'images/editor/' . $randomName;
|
||||
$returnPathToImage = BASE_URL . EDITOR_IMAGES_DIR . $randomName;
|
||||
echo json_encode(['location' => $returnPathToImage]);
|
||||
} else {
|
||||
// Notify editor that the upload failed
|
||||
|
Reference in New Issue
Block a user