aboutsummaryrefslogtreecommitdiff
path: root/src/api/routes/uploads
diff options
context:
space:
mode:
authorZephyrrus <[email protected]>2020-07-08 19:22:25 +0300
committerZephyrrus <[email protected]>2020-07-08 19:22:25 +0300
commit6713eca9d4a4887dc8d7416dbdd8ec37de7bb2ed (patch)
treeef79104c0ddaa038baaff36d01f7eb474af8b791 /src/api/routes/uploads
parentchore: linter the entire project using the new rules (diff)
downloadhost.fuwn.me-6713eca9d4a4887dc8d7416dbdd8ec37de7bb2ed.tar.xz
host.fuwn.me-6713eca9d4a4887dc8d7416dbdd8ec37de7bb2ed.zip
chore: add unique integrity checks to the database for many-to-many tables
Diffstat (limited to 'src/api/routes/uploads')
-rw-r--r--src/api/routes/uploads/uploadPOST.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/api/routes/uploads/uploadPOST.js b/src/api/routes/uploads/uploadPOST.js
index 48fc592..99f5ee5 100644
--- a/src/api/routes/uploads/uploadPOST.js
+++ b/src/api/routes/uploads/uploadPOST.js
@@ -84,10 +84,7 @@ class uploadPOST extends Route {
if (remappedKeys && remappedKeys.uuid) {
const chunkOutput = path.join(__dirname,
- '..',
- '..',
- '..',
- '..',
+ '../../../../',
process.env.UPLOAD_FOLDER,
'chunks',
remappedKeys.uuid,
@@ -95,10 +92,7 @@ class uploadPOST extends Route {
await jetpack.writeAsync(chunkOutput, file.buffer);
} else {
const output = path.join(__dirname,
- '..',
- '..',
- '..',
- '..',
+ '../../../../',
process.env.UPLOAD_FOLDER,
filename);
await jetpack.writeAsync(output, file.buffer);