rename filename to keep clean
This commit is contained in:
parent
4e0d00c9ca
commit
1f1cd4e3ec
|
@ -546,7 +546,7 @@
|
||||||
formData.append('tokenCSRF', tokenCSRF);
|
formData.append('tokenCSRF', tokenCSRF);
|
||||||
formData.append('inputFile', $(this)[0].files[0]);
|
formData.append('inputFile', $(this)[0].files[0]);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: HTML_PATH_ADMIN_ROOT+"ajax/upload-logo",
|
url: HTML_PATH_ADMIN_ROOT+"ajax/logo-upload",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
data: formData,
|
data: formData,
|
||||||
cache: false,
|
cache: false,
|
||||||
|
|
|
@ -1,7 +1,14 @@
|
||||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
header('Content-Type: application/json');
|
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);
|
$logoFilename = $site->logo(false);
|
||||||
if ($logoFilename) {
|
if ($logoFilename) {
|
||||||
Filesystem::rmfile(PATH_UPLOADS.$logoFilename);
|
Filesystem::rmfile(PATH_UPLOADS.$logoFilename);
|
|
@ -26,7 +26,7 @@ class bluditAjax {
|
||||||
}
|
}
|
||||||
|
|
||||||
static async removeLogo() {
|
static async removeLogo() {
|
||||||
let url = HTML_PATH_ADMIN_ROOT+"ajax/remove-logo"
|
let url = HTML_PATH_ADMIN_ROOT+"ajax/logo-remove"
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url, {
|
const response = await fetch(url, {
|
||||||
credentials: 'same-origin',
|
credentials: 'same-origin',
|
||||||
|
|
Loading…
Reference in New Issue