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

@@ -1,6 +1,6 @@
import { useState, useRef, useEffect, useCallback } from "react";
import { compressImage } from "../utils/compressImage";
import { API_URL } from "../config/authConstants";
import { getImageUrl } from "../config/authConstants";
const MAX_SIZE_MB = 5;
export const ACCEPT = "image/jpeg,image/png,image/webp";
@@ -21,7 +21,7 @@ export function useImageUpload(existingUrls = []) {
setImages(existingUrlList.map((url, i) => ({
id: `existing-${i}`,
file: null,
preview: `${API_URL}${url}`,
preview: getImageUrl(url),
isExisting: true,
serverUrl: url,
})));