fix gallery delete and save

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2026-07-13 18:56:40 +02:00
parent d39bd45d04
commit fb71f63d77
7 changed files with 11 additions and 7 deletions
+1 -1
View File
@@ -273,7 +273,7 @@ export async function deleteFile(filename) {
if (!filename) return;
// eslint-disable-next-line no-alert
if (!confirm(`Are you sure you want to delete the object - This action cannot be undone? Object: ${filename}`)) return;
const res = await authFetch(`${window.api}/delete-file?file=${encodeURIComponent(filename)}`);
const res = await authFetch(`${window.api}/delete-file?file=${encodeURIComponent(filename)}`, { method: 'DELETE' });
if (!res || res.status !== 200) {
error('FileDelete', { file: filename, status: res?.status, statusText: res?.statusText });
return;