fixed image storage local on minio
This commit is contained in:
@@ -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" },
|
||||
|
||||
Reference in New Issue
Block a user