dev #854
@ -11,7 +11,7 @@ const s3 = new S3Client({
|
||||
})
|
||||
|
||||
const uploadImage = async (file) => {
|
||||
console.log('🚀 ~ uploadImage ~ file:', file)
|
||||
// console.log('🚀 ~ uploadImage ~ file:', file)
|
||||
const Body = Buffer.from(await file.arrayBuffer())
|
||||
const Key = `cads/${file.name}`
|
||||
const ContentType = 'image/png'
|
||||
@ -49,7 +49,7 @@ export async function DELETE(req) {
|
||||
try {
|
||||
const searchParams = req.nextUrl.searchParams
|
||||
const Key = `cads/${searchParams.get('fileName')}`
|
||||
console.log('🚀 ~ DELETE ~ Key:', Key)
|
||||
// console.log('🚀 ~ DELETE ~ Key:', Key)
|
||||
|
||||
if (!Key) {
|
||||
return NextResponse.json({ error: 'fileName parameter is required' }, { status: 400 })
|
||||
|
||||
@ -57,7 +57,7 @@ export async function DELETE(req) {
|
||||
try {
|
||||
const searchParams = req.nextUrl.searchParams
|
||||
const Key = `maps/${searchParams.get('fileName')}`
|
||||
console.log('🚀 ~ DELETE ~ Key:', Key)
|
||||
// console.log('🚀 ~ DELETE ~ Key:', Key)
|
||||
|
||||
if (!Key) {
|
||||
return NextResponse.json({ error: 'fileName parameter is required' }, { status: 400 })
|
||||
|
||||
@ -55,7 +55,7 @@ export async function DELETE(req) {
|
||||
}
|
||||
|
||||
const Key = `upload/${fileName}`
|
||||
console.log('🚀 ~ DELETE ~ Key:', Key)
|
||||
// console.log('🚀 ~ DELETE ~ Key:', Key)
|
||||
|
||||
await s3.send(
|
||||
new DeleteObjectCommand({
|
||||
|
||||
@ -5,7 +5,7 @@ import configProduction from './config.production'
|
||||
|
||||
// 클라이언트에서는 이 함수를 사용하여 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) {
|
||||
case 'local':
|
||||
return configLocal
|
||||
|
||||
@ -10,7 +10,7 @@ import fs from 'fs/promises'
|
||||
const imageSavePath = 'public/cadImages'
|
||||
|
||||
const convertDwgToPng = async (fileName, data) => {
|
||||
console.log('fileName', fileName)
|
||||
// console.log('fileName', fileName)
|
||||
try {
|
||||
await fs.readdir(imageSavePath)
|
||||
} catch {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user