fixed image storage local on minio

This commit is contained in:
SlimusMinus
2026-07-10 01:24:58 +03:00
parent 7e9053e498
commit a344540267
9 changed files with 37 additions and 22 deletions

View File

@@ -11,6 +11,13 @@ import glassesIcon from '../assets/glasses.png';
export const API_URL = process.env.REACT_APP_API_URL || "http://192.168.1.68:8080";
export function getImageUrl(filename) {
if (!filename) return null;
if (filename.startsWith("http")) return filename;
if (filename.startsWith("/")) return `${API_URL}${filename}`;
return `${API_URL}/api/v1/files/${filename}`;
}
export const FLOAT_ICONS = [
{ icon: bagIcon, top: "5%", left: "5%", delay: "0s" },
{ icon: catIcon, top: "5%", right: "5%", delay: "1s" },