]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/upload.ts
Correctly cleanup sql command
[github/Chocobozzz/PeerTube.git] / server / helpers / upload.ts
index 030a6b7d547e48ea99e44fd3eaf9eea6cd4dc6d4..f5f476913eb8006c4649c101458c4b69b0292db3 100644 (file)
@@ -1,21 +1,14 @@
-import { METAFILE_EXTNAME } from '@uploadx/core'
-import { remove } from 'fs-extra'
 import { join } from 'path'
-import { RESUMABLE_UPLOAD_DIRECTORY } from '../initializers/constants'
+import { DIRECTORIES } from '@server/initializers/constants'
 
 function getResumableUploadPath (filename?: string) {
-  if (filename) return join(RESUMABLE_UPLOAD_DIRECTORY, filename)
+  if (filename) return join(DIRECTORIES.RESUMABLE_UPLOAD, filename)
 
-  return RESUMABLE_UPLOAD_DIRECTORY
-}
-
-function deleteResumableUploadMetaFile (filepath: string) {
-  return remove(filepath + METAFILE_EXTNAME)
+  return DIRECTORIES.RESUMABLE_UPLOAD
 }
 
 // ---------------------------------------------------------------------------
 
 export {
-  getResumableUploadPath,
-  deleteResumableUploadMetaFile
+  getResumableUploadPath
 }