aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/image-utils.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-27 16:23:34 +0200
committerChocobozzz <me@florianbigard.com>2018-08-27 16:23:34 +0200
commit62689b942b71cd1dd0d050c6ed05f884a0b325c2 (patch)
treec45c35d35d7a3e32621fba06edc63646930c8efd /server/helpers/image-utils.ts
parent84b6dbcc6e8654f39ec798905e1151ba915cd1aa (diff)
downloadPeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.tar.gz
PeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.tar.zst
PeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.zip
Correctly migrate to fs-extra
Diffstat (limited to 'server/helpers/image-utils.ts')
-rw-r--r--server/helpers/image-utils.ts4
1 files changed, 2 insertions, 2 deletions
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 @@
1import 'multer' 1import 'multer'
2import * as sharp from 'sharp' 2import * as sharp from 'sharp'
3import { unlinkPromise } from './core-utils' 3import { remove } from 'fs-extra'
4 4
5async function processImage ( 5async function processImage (
6 physicalFile: { path: string }, 6 physicalFile: { path: string },
@@ -11,7 +11,7 @@ async function processImage (
11 .resize(newSize.width, newSize.height) 11 .resize(newSize.width, newSize.height)
12 .toFile(destination) 12 .toFile(destination)
13 13
14 await unlinkPromise(physicalFile.path) 14 await remove(physicalFile.path)
15} 15}
16 16
17// --------------------------------------------------------------------------- 17// ---------------------------------------------------------------------------