mirror of
https://framagit.org/les/gancio.git
synced 2025-02-01 00:52:01 +01:00
[fix] remove media files on event removal
This commit is contained in:
parent
ecd3f1bd05
commit
5cdb792fcb
1 changed files with 2 additions and 4 deletions
|
@ -51,10 +51,8 @@ const userController = {
|
|||
const old_path = path.join(config.upload_path, event.image_path)
|
||||
const old_thumb_path = path.join(config.upload_path, 'thumb', event.image_path)
|
||||
try {
|
||||
console.error('media files not removed')
|
||||
// TOFIX
|
||||
await fs.unlink(old_thumb_path)
|
||||
await fs.unlink(old_path)
|
||||
fs.unlinkSync(old_thumb_path)
|
||||
fs.unlinkSync(old_path)
|
||||
} catch (e) {
|
||||
debug(e)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue