X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fimage-utils.ts;h=3eaa674ed98e4bf67fa0db0026045a36885a045f;hb=8b60488020883c66d3831eacd030893ab184268f;hp=ba57b5812c91f7961b736f46efd05db612f6a628;hpb=ac81d1a06d57b9ae86663831e7f5edcef57b0fa4;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/image-utils.ts b/server/helpers/image-utils.ts index ba57b5812..3eaa674ed 100644 --- a/server/helpers/image-utils.ts +++ b/server/helpers/image-utils.ts @@ -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) } // ---------------------------------------------------------------------------