-async function downloadImage (url: string, destPath: string, size: { width: number, height: number }) {
- const tmpPath = destPath + '.tmp'
-
+async function downloadImage (url: string, destDir: string, destName: string, size: { width: number, height: number }) {
+ const tmpPath = join(CONFIG.STORAGE.TMP_DIR, 'pending-' + destName)