file delete manual now
This commit is contained in:
@@ -27,8 +27,9 @@ export default defineEventHandler(async (event) => {
|
||||
setHeader(event, 'Content-Disposition', `attachment; filename="${file}"`)
|
||||
|
||||
const file_stream = createReadStream(filepath)
|
||||
|
||||
|
||||
file_stream.on("close", () => unlink(filepath, (err) => { if (err) console.warn(err.message) }))
|
||||
//file_stream.on("close", () => unlink(filepath, (err) => { if (err) console.warn(err.message) }))
|
||||
|
||||
return file_stream;
|
||||
})
|
||||
Reference in New Issue
Block a user