diff options
author | Chocobozzz <me@florianbigard.com> | 2018-12-04 16:02:49 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-12-04 16:04:15 +0100 |
commit | 6040f87d143a5fa01db79867ece8197c3ce7be47 (patch) | |
tree | 98e5fcbced3e55df2f51421250eaa57f3c511299 /server/controllers/static.ts | |
parent | 745778256ced65415b04a9817fc49db70d4b6681 (diff) | |
download | PeerTube-6040f87d143a5fa01db79867ece8197c3ce7be47.tar.gz PeerTube-6040f87d143a5fa01db79867ece8197c3ce7be47.tar.zst PeerTube-6040f87d143a5fa01db79867ece8197c3ce7be47.zip |
Add tmp and redundancy directories
Diffstat (limited to 'server/controllers/static.ts')
-rw-r--r-- | server/controllers/static.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/server/controllers/static.ts b/server/controllers/static.ts index 75e30353c..f16a7d72b 100644 --- a/server/controllers/static.ts +++ b/server/controllers/static.ts | |||
@@ -34,13 +34,18 @@ staticRouter.use( | |||
34 | ) | 34 | ) |
35 | 35 | ||
36 | // Videos path for webseeding | 36 | // Videos path for webseeding |
37 | const videosPhysicalPath = CONFIG.STORAGE.VIDEOS_DIR | ||
38 | staticRouter.use( | 37 | staticRouter.use( |
39 | STATIC_PATHS.WEBSEED, | 38 | STATIC_PATHS.WEBSEED, |
40 | cors(), | 39 | cors(), |
41 | express.static(videosPhysicalPath) | 40 | express.static(CONFIG.STORAGE.VIDEOS_DIR) |
42 | ) | 41 | ) |
43 | staticRouter.use( | 42 | staticRouter.use( |
43 | STATIC_PATHS.WEBSEED, | ||
44 | cors(), | ||
45 | express.static(CONFIG.STORAGE.REDUNDANCY_DIR, { fallthrough: false }) // 404, because we don't have this video | ||
46 | ) | ||
47 | |||
48 | staticRouter.use( | ||
44 | STATIC_DOWNLOAD_PATHS.VIDEOS + ':id-:resolution([0-9]+).:extension', | 49 | STATIC_DOWNLOAD_PATHS.VIDEOS + ':id-:resolution([0-9]+).:extension', |
45 | asyncMiddleware(videosGetValidator), | 50 | asyncMiddleware(videosGetValidator), |
46 | asyncMiddleware(downloadVideoFile) | 51 | asyncMiddleware(downloadVideoFile) |