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