aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/utils.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-12-04 16:02:49 +0100
committerChocobozzz <me@florianbigard.com>2018-12-04 16:04:15 +0100
commit6040f87d143a5fa01db79867ece8197c3ce7be47 (patch)
tree98e5fcbced3e55df2f51421250eaa57f3c511299 /server/helpers/utils.ts
parent745778256ced65415b04a9817fc49db70d4b6681 (diff)
downloadPeerTube-6040f87d143a5fa01db79867ece8197c3ce7be47.tar.gz
PeerTube-6040f87d143a5fa01db79867ece8197c3ce7be47.tar.zst
PeerTube-6040f87d143a5fa01db79867ece8197c3ce7be47.zip
Add tmp and redundancy directories
Diffstat (limited to 'server/helpers/utils.ts')
-rw-r--r--server/helpers/utils.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/helpers/utils.ts b/server/helpers/utils.ts
index 5c9d6fe2f..9b89e3e61 100644
--- a/server/helpers/utils.ts
+++ b/server/helpers/utils.ts
@@ -46,11 +46,11 @@ const getServerActor = memoizee(async function () {
46 return actor 46 return actor
47}) 47})
48 48
49function generateVideoTmpPath (target: string | ParseTorrent) { 49function generateVideoImportTmpPath (target: string | ParseTorrent) {
50 const id = typeof target === 'string' ? target : target.infoHash 50 const id = typeof target === 'string' ? target : target.infoHash
51 51
52 const hash = sha256(id) 52 const hash = sha256(id)
53 return join(CONFIG.STORAGE.VIDEOS_DIR, hash + '-import.mp4') 53 return join(CONFIG.STORAGE.TMP_DIR, hash + '-import.mp4')
54} 54}
55 55
56function getSecureTorrentName (originalName: string) { 56function getSecureTorrentName (originalName: string) {
@@ -103,6 +103,6 @@ export {
103 getSecureTorrentName, 103 getSecureTorrentName,
104 getServerActor, 104 getServerActor,
105 getServerCommit, 105 getServerCommit,
106 generateVideoTmpPath, 106 generateVideoImportTmpPath,
107 getUUIDFromFilename 107 getUUIDFromFilename
108} 108}