rename filename to keep clean

This commit is contained in:
Diego Najar 2019-05-10 20:02:24 +02:00
parent 4e0d00c9ca
commit 1f1cd4e3ec
5 changed files with 10 additions and 3 deletions

View File

@ -546,7 +546,7 @@
formData.append('tokenCSRF', tokenCSRF);
formData.append('inputFile', $(this)[0].files[0]);
$.ajax({
url: HTML_PATH_ADMIN_ROOT+"ajax/upload-logo",
url: HTML_PATH_ADMIN_ROOT+"ajax/logo-upload",
type: "POST",
data: formData,
cache: false,

View File

@ -1,7 +1,14 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json');
// Delete logo image
/*
| Delete the site logo
| This script delete the file and set and empty string in the database
|
| @return array
*/
// Delete the file
$logoFilename = $site->logo(false);
if ($logoFilename) {
Filesystem::rmfile(PATH_UPLOADS.$logoFilename);

View File

@ -26,7 +26,7 @@ class bluditAjax {
}
static async removeLogo() {
let url = HTML_PATH_ADMIN_ROOT+"ajax/remove-logo"
let url = HTML_PATH_ADMIN_ROOT+"ajax/logo-remove"
try {
const response = await fetch(url, {
credentials: 'same-origin',