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