]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/image-utils.ts
Add timeout on youtube dl to cleaup files
[github/Chocobozzz/PeerTube.git] / server / helpers / image-utils.ts
index 0065f4210319866683fd931e9b8652276fe2aba4..3eaa674ed98e4bf67fa0db0026045a36885a045f 100644 (file)
@@ -1,6 +1,6 @@
 import 'multer'
 import * as sharp from 'sharp'
-import { unlinkPromise } from './core-utils'
+import { remove } from 'fs-extra'
 
 async function processImage (
   physicalFile: { path: string },
@@ -11,7 +11,7 @@ async function processImage (
     .resize(newSize.width, newSize.height)
     .toFile(destination)
 
-  await unlinkPromise(physicalFile.path)
+  await remove(physicalFile.path)
 }
 
 // ---------------------------------------------------------------------------