import { getConfig } from "@common/config"; import { ENDPOINT } from "../config"; const { PROXY_HOST } = getConfig(); const BASE_URL = `${PROXY_HOST}/server`; export const getImageUrlByAtflCd = async (atflCd: string): Promise => { if (!atflCd) return ""; const response = await fetch( `${BASE_URL}${ENDPOINT.ATTACH_SERVICE.IMAGES}/atflCd/${atflCd}`, ); const blob = await response.blob(); return URL.createObjectURL(blob); };