diff --git a/server/server.js b/server/server.js index 8f313fd..14eaaf4 100644 --- a/server/server.js +++ b/server/server.js @@ -472,7 +472,8 @@ initDb().then(() => { : `image_${timestamp}${fileExt}` const outputPath = path.join(mediaDir, outputFilename); - fs.renameSync(file.path, outputPath); + fs.copyFileSync(file.path, outputPath); + fs.unlinkSync(file.path); res.json({ success: true,