aboutsummaryrefslogtreecommitdiff
path: root/src/files.ts
diff options
context:
space:
mode:
authorHafeez2018-04-20 16:59:50 +0100
committerHafeez2018-04-20 16:59:50 +0100
commitafdfe914feb3082fca5f735524175916ef221cb7 (patch)
treea2bff440ae74024020e3a2d9443551d7103a6eac /src/files.ts
parentcommit for merge (diff)
parentFinalise CORS support with package corser (diff)
downloadmedicine-afdfe914feb3082fca5f735524175916ef221cb7.tar.gz
medicine-afdfe914feb3082fca5f735524175916ef221cb7.zip

asdas

Diffstat (limited to 'src/files.ts')
-rw-r--r--src/files.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/files.ts b/src/files.ts
index 5b15a10..e87d8da 100644
--- a/src/files.ts
+++ b/src/files.ts
@@ -32,12 +32,20 @@ const readableStream: (filename: string, projectName: string, { offset, length }
return fs.createReadStream(path(filename, projectName), options);
};
-const logPath: (type: string, projectName?: string) => string = (
+export function logPath (type: string, projectName?: string){
+ return projectName
+ ? `${LOG_BASE_DIRECTORY}/projects/${projectName}/${type}`
+ : `${LOG_BASE_DIRECTORY}/general/${type}`;
+}
+
+/*
+export const logPath: (type: string, projectName?: string) => string = (
type: string, projectName?: string): string => {
return projectName
? `${LOG_BASE_DIRECTORY}/projects/${projectName}/${type}`
: `${LOG_BASE_DIRECTORY}/general/${type}`;
};
+*/
let storage = Multer.diskStorage({
destination: function (req, file, cb) {