aboutsummaryrefslogtreecommitdiff
path: root/src/FileRouter.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/FileRouter.ts')
-rw-r--r--src/FileRouter.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/FileRouter.ts b/src/FileRouter.ts
index f7a1809..70243c3 100644
--- a/src/FileRouter.ts
+++ b/src/FileRouter.ts
@@ -575,7 +575,7 @@ const postFilePath: Middleware = (
name: res.locals.filename,
parentFolder: res.locals.parentFolder
});
- //console.log(res.locals);
+ //console.log(res.locals);
req.pipe(files.writableStream(file.uuid, res.locals.project.name));
next();
};
@@ -702,13 +702,16 @@ export class FileRouter {
}
fileNames.splice(0, 1);
}
+ if (file == null) {
+ return next();
+ }
const parentFolder: File | null = await File.findOne({
include: [
{ model: File, as: 'containedFilesInternal'}
],
where: {
- //parentFolder: file,
- //name: fileNames[0]
+ parentFolderId: file.id,
+ name: fileNames[0]
}
});
//console.log(parentFolder);