]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/image-utils.ts
Decrease log file max size
[github/Chocobozzz/PeerTube.git] / server / helpers / image-utils.ts
index ba57b5812c91f7961b736f46efd05db612f6a628..3eaa674ed98e4bf67fa0db0026045a36885a045f 100644 (file)
@@ -1,9 +1,9 @@
 import 'multer'
 import * as sharp from 'sharp'
-import { unlinkPromise } from './core-utils'
+import { remove } from 'fs-extra'
 
 async function processImage (
-  physicalFile: Express.Multer.File,
+  physicalFile: { path: string },
   destination: string,
   newSize: { width: number, height: number }
 ) {
@@ -11,7 +11,7 @@ async function processImage (
     .resize(newSize.width, newSize.height)
     .toFile(destination)
 
-  await unlinkPromise(physicalFile.path)
+  await remove(physicalFile.path)
 }
 
 // ---------------------------------------------------------------------------