aboutsummaryrefslogtreecommitdiff
path: root/src/files.ts
diff options
context:
space:
mode:
authorjw2552018-04-19 19:47:22 +0100
committerjw2552018-04-19 19:47:22 +0100
commite28cc777e4956f718e0dc6387b94b53cf6be8417 (patch)
treeb67d222f098e9e924fcfaa0542aa610371583a19 /src/files.ts
parentAdd further CORS support (diff)
downloadmedicine-e28cc777e4956f718e0dc6387b94b53cf6be8417.tar.gz
medicine-e28cc777e4956f718e0dc6387b94b53cf6be8417.zip

fixed test-crash

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) {