Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit a2a5425

Browse files
author
dengjun
committed
refine the profile API
1 parent ec78ebd commit a2a5425

File tree

6 files changed

+1253
-5
lines changed

6 files changed

+1253
-5
lines changed

config/default.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,5 @@ module.exports = {
5050
"docx",
5151
"txt",
5252
],
53+
MAX_ALLOWED_FILE_SIZE_MB: process.env.MAX_ALLOWED_FILE_SIZE_MB || 10,
5354
};

src/api/app-routes.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,16 @@ const authenticator = require("tc-core-library-js").middleware.jwtAuthenticator;
1919
module.exports = (app) => {
2020
app.use(express.json());
2121
app.use(cors());
22-
app.use(fileUpload());
22+
app.use(
23+
fileUpload({
24+
limits: {
25+
fields: 20,
26+
fileSize: config.MAX_ALLOWED_FILE_SIZE_MB * 1024 * 1024,
27+
files: 1,
28+
},
29+
debug: config.get("LOG_LEVEL") === "debug",
30+
})
31+
);
2332
// intercept the response body from jwtAuthenticator
2433
app.use(helper.interceptor);
2534
// Load all routes

src/api/data/resume.invalid

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
My resume

0 commit comments

Comments
 (0)