diff --git a/.env.development b/.env.development index 1ca922e7..e6e38032 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,7 @@ NEXT_PUBLIC_API_SERVER_PATH="http://1.248.227.176:38080" NEXT_PUBLIC_HOST_URL="//1.248.227.176:4000" -NEXT_PUBLIC_API_HOST_URL="http://1.248.227.176:5000" +NEXT_PUBLIC_API_HOST_URL="http://1.248.227.176:3000" SESSION_SECRET="i3iHH1yp2/2SpQSIySQ4bpyc4g0D+zCF9FAn5xUG0+Y=" @@ -24,4 +24,4 @@ AWS_REGION="ap-northeast-1" AMPLIFY_BUCKET="files.hanasys.jp" AWS_ACCESS_KEY_ID="AKIA3K4QWLZHFZRJOM2E" AWS_SECRET_ACCESS_KEY="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" -NEXT_PUBLIC_AWS_S3_BASE_URL="http://files.hanasys.jp.s3-website-ap-northeast-1.amazonaws.com" \ No newline at end of file +NEXT_PUBLIC_AWS_S3_BASE_URL="//files.hanasys.jp" \ No newline at end of file diff --git a/.env.production b/.env.production index 3842b041..b2d50cdd 100644 --- a/.env.production +++ b/.env.production @@ -18,4 +18,4 @@ AWS_REGION="ap-northeast-2" AMPLIFY_BUCKET="interplug" AWS_ACCESS_KEY_ID="AKIAVWMWJCUXFHEAZ4FR" AWS_SECRET_ACCESS_KEY="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" -NEXT_PUBLIC_AWS_S3_BASE_URL="https://interplug.s3.ap-northeast-2.amazonaws.com" \ No newline at end of file +NEXT_PUBLIC_AWS_S3_BASE_URL="//files.hanasys.jp" \ No newline at end of file diff --git a/qcast3.database.sqlite b/qcast3.database.sqlite index 166f2da2..6a7a809a 100644 Binary files a/qcast3.database.sqlite and b/qcast3.database.sqlite differ diff --git a/src/hooks/common/useRefFiles.js b/src/hooks/common/useRefFiles.js index 3be7fff2..94f7a8df 100644 --- a/src/hooks/common/useRefFiles.js +++ b/src/hooks/common/useRefFiles.js @@ -89,7 +89,7 @@ export function useRefFiles() { setPopSpinnerStore(true) console.log('πŸš€ ~ handleFileDelete ~ handleFileDelete:', refImage) console.log('πŸš€ ~ handleFileDelete ~ currentCanvasPlan.bgImageName:', currentCanvasPlan.bgImageName) - await del({ url: `http://localhost:3000/api/image/upload?fileName=${currentCanvasPlan.bgImageName}` }) + await del({ url: `${process.env.NEXT_PUBLIC_API_HOST_URL}/api/image/upload?fileName=${currentCanvasPlan.bgImageName}` }) // setRefImage(null) setCurrentBgImage(null) // setCurrentCanvasPlan((prev) => ({ ...prev, bgImageName: null })) @@ -112,7 +112,7 @@ export function useRefFiles() { confirmFn: async () => { console.log('πŸš€ ~ handleAddressDelete ~ handleAddressDelete:', refImage) console.log('πŸš€ ~ handleAddressDelete ~ currentCanvasPlan.bgImageName:', currentCanvasPlan.bgImageName) - await del({ url: `http://localhost:3000/api/image/map?fileName=${currentCanvasPlan.bgImageName}` }) + await del({ url: `${process.env.NEXT_PUBLIC_API_HOST_URL}/api/image/map?fileName=${currentCanvasPlan.bgImageName}` }) setMapPositionAddress('') setCurrentBgImage(null) // setCurrentCanvasPlan((prev) => ({ ...prev, mapPositionAddress: null })) @@ -147,7 +147,7 @@ export function useRefFiles() { // url: `${process.env.NEXT_PUBLIC_HOST_URL}/map/convert?q=${queryRef.current.value}&fileNm=${currentCanvasPlan.id}&zoom=20`, // }) const res = await get({ - url: `http://localhost:3000/api/image/map?q=${queryRef.current.value}&fileNm=${currentCanvasPlan.id}&zoom=20`, + url: `${process.env.NEXT_PUBLIC_API_HOST_URL}/api/image/map?q=${queryRef.current.value}&fileNm=${currentCanvasPlan.id}&zoom=20`, }) console.log('πŸš€ ~ handleMapImageDown ~ res:', res) // setCurrentBgImage(`${process.env.NEXT_PUBLIC_HOST_URL}${res.filePath}`) @@ -211,12 +211,13 @@ export function useRefFiles() { // data: formData, // }) const res = await post({ - url: `http://localhost:3000/api/image/upload`, + url: `${process.env.NEXT_PUBLIC_API_HOST_URL}/api/image/upload`, data: formData, }) console.log('πŸš€ ~ handleUploadImageRefFile ~ res:', res) // setCurrentBgImage(`${process.env.NEXT_PUBLIC_HOST_URL}${res.filePath}`) - setCurrentBgImage(`${res.filePath}`) + // setCurrentBgImage(`${res.filePath}`) + setCurrentBgImage(`${process.env.NEXT_PUBLIC_AWS_S3_BASE_URL}/${res.fileName}`) setRefImage(file) const params = { @@ -244,12 +245,13 @@ export function useRefFiles() { /** μΊλ“œ 도면 파일 μ—…λ‘œλ“œ */ const result = await post({ - url: `http://localhost:3000/api/image/cad`, + url: `${process.env.NEXT_PUBLIC_API_HOST_URL}/api/image/cad`, data: res, }) console.log('πŸš€ ~ handleUploadConvertRefFile ~ result:', result) - setCurrentBgImage(`${result.filePath}`) + // setCurrentBgImage(`${result.filePath}`) + setCurrentBgImage(`${process.env.NEXT_PUBLIC_AWS_S3_BASE_URL}/${res.fileName}`) setRefImage(file) const params = {