1 import { METAFILE_EXTNAME } from '@uploadx/core'
2 import { remove } from 'fs-extra'
3 import { join } from 'path'
4 import { RESUMABLE_UPLOAD_DIRECTORY } from '../initializers/constants'
6 function getResumableUploadPath (filename?: string) {
7 if (filename) return join(RESUMABLE_UPLOAD_DIRECTORY, filename)
9 return RESUMABLE_UPLOAD_DIRECTORY
12 function deleteResumableUploadMetaFile (filepath: string) {
13 return remove(filepath + METAFILE_EXTNAME)
16 // ---------------------------------------------------------------------------
19 getResumableUploadPath,
20 deleteResumableUploadMetaFile