2차 로그정리
This commit is contained in:
parent
347536e87a
commit
f6652acbd7
@ -11,7 +11,7 @@ const s3 = new S3Client({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const uploadImage = async (file) => {
|
const uploadImage = async (file) => {
|
||||||
console.log('🚀 ~ uploadImage ~ file:', file)
|
// console.log('🚀 ~ uploadImage ~ file:', file)
|
||||||
const Body = Buffer.from(await file.arrayBuffer())
|
const Body = Buffer.from(await file.arrayBuffer())
|
||||||
const Key = `cads/${file.name}`
|
const Key = `cads/${file.name}`
|
||||||
const ContentType = 'image/png'
|
const ContentType = 'image/png'
|
||||||
@ -49,7 +49,7 @@ export async function DELETE(req) {
|
|||||||
try {
|
try {
|
||||||
const searchParams = req.nextUrl.searchParams
|
const searchParams = req.nextUrl.searchParams
|
||||||
const Key = `cads/${searchParams.get('fileName')}`
|
const Key = `cads/${searchParams.get('fileName')}`
|
||||||
console.log('🚀 ~ DELETE ~ Key:', Key)
|
// console.log('🚀 ~ DELETE ~ Key:', Key)
|
||||||
|
|
||||||
if (!Key) {
|
if (!Key) {
|
||||||
return NextResponse.json({ error: 'fileName parameter is required' }, { status: 400 })
|
return NextResponse.json({ error: 'fileName parameter is required' }, { status: 400 })
|
||||||
|
|||||||
@ -57,7 +57,7 @@ export async function DELETE(req) {
|
|||||||
try {
|
try {
|
||||||
const searchParams = req.nextUrl.searchParams
|
const searchParams = req.nextUrl.searchParams
|
||||||
const Key = `maps/${searchParams.get('fileName')}`
|
const Key = `maps/${searchParams.get('fileName')}`
|
||||||
console.log('🚀 ~ DELETE ~ Key:', Key)
|
// console.log('🚀 ~ DELETE ~ Key:', Key)
|
||||||
|
|
||||||
if (!Key) {
|
if (!Key) {
|
||||||
return NextResponse.json({ error: 'fileName parameter is required' }, { status: 400 })
|
return NextResponse.json({ error: 'fileName parameter is required' }, { status: 400 })
|
||||||
|
|||||||
@ -55,7 +55,7 @@ export async function DELETE(req) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Key = `upload/${fileName}`
|
const Key = `upload/${fileName}`
|
||||||
console.log('🚀 ~ DELETE ~ Key:', Key)
|
// console.log('🚀 ~ DELETE ~ Key:', Key)
|
||||||
|
|
||||||
await s3.send(
|
await s3.send(
|
||||||
new DeleteObjectCommand({
|
new DeleteObjectCommand({
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import configProduction from './config.production'
|
|||||||
|
|
||||||
// 클라이언트에서는 이 함수를 사용하여 config 값을 참조합니다.
|
// 클라이언트에서는 이 함수를 사용하여 config 값을 참조합니다.
|
||||||
const Config = () => {
|
const Config = () => {
|
||||||
console.log('🚀 ~ Config ~ process.env.NEXT_PUBLIC_RUN_MODE:', process.env.NEXT_PUBLIC_RUN_MODE)
|
// console.log('🚀 ~ Config ~ process.env.NEXT_PUBLIC_RUN_MODE:', process.env.NEXT_PUBLIC_RUN_MODE)
|
||||||
switch (process.env.NEXT_PUBLIC_RUN_MODE) {
|
switch (process.env.NEXT_PUBLIC_RUN_MODE) {
|
||||||
case 'local':
|
case 'local':
|
||||||
return configLocal
|
return configLocal
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import fs from 'fs/promises'
|
|||||||
const imageSavePath = 'public/cadImages'
|
const imageSavePath = 'public/cadImages'
|
||||||
|
|
||||||
const convertDwgToPng = async (fileName, data) => {
|
const convertDwgToPng = async (fileName, data) => {
|
||||||
console.log('fileName', fileName)
|
// console.log('fileName', fileName)
|
||||||
try {
|
try {
|
||||||
await fs.readdir(imageSavePath)
|
await fs.readdir(imageSavePath)
|
||||||
} catch {
|
} catch {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user