fix: Remove unused file
This commit is contained in:
parent
c866714cb9
commit
fa20145956
@ -1,22 +0,0 @@
|
||||
'use server'
|
||||
import path from 'path'
|
||||
import multer from 'multer'
|
||||
|
||||
export const upload = (files) => {
|
||||
console.log(files)
|
||||
const storage = multer.diskStorage({
|
||||
destination: (req, file, callback) => {
|
||||
const extension = path.extname(file.originalname)
|
||||
const basename = path.basename(file.originalname, extension)
|
||||
callback(null, `/public/upload/${basename}-${Date.now()}${extension}`)
|
||||
},
|
||||
filename: (req, file, callback) => {
|
||||
callback(null, `${file.fieldname}-${Date.now()}${path.extname(file.originalname)}`)
|
||||
}
|
||||
})
|
||||
const test = multer({
|
||||
storage: storage
|
||||
}).array(files.name, 5)
|
||||
|
||||
console.log(test)
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user