10 lines
171 B
JavaScript
10 lines
171 B
JavaScript
const cleanupUploadedFile = (file) => {
|
|
if (file?.path && fs.existsSync(file.path)) {
|
|
fs.unlinkSync(file.path);
|
|
}
|
|
};
|
|
|
|
module.exports = {
|
|
cleanupUploadedFile,
|
|
};
|