badmfck-api-server 1.8.2 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -51,7 +51,7 @@ async function Initializer(services) {
|
|
51
51
|
exports.Initializer = Initializer;
|
52
52
|
class APIService extends BaseService_1.BaseService {
|
53
53
|
static nextLogID = 0;
|
54
|
-
version = "1.8.
|
54
|
+
version = "1.8.3";
|
55
55
|
options;
|
56
56
|
monitor;
|
57
57
|
monitorIndexFile;
|
@@ -107,7 +107,9 @@ class APIService extends BaseService_1.BaseService {
|
|
107
107
|
limits: { fileSize: this.options.fileLimit },
|
108
108
|
useTempFiles: true,
|
109
109
|
uriDecodeFileNames: true,
|
110
|
-
tempFileDir: this.options.fileTempDir
|
110
|
+
tempFileDir: this.options.fileTempDir,
|
111
|
+
safeFileNames: true,
|
112
|
+
abortOnLimit: true
|
111
113
|
}));
|
112
114
|
app.use(async (err, req, resp, next) => {
|
113
115
|
if (!err) {
|
@@ -172,6 +174,7 @@ class APIService extends BaseService_1.BaseService {
|
|
172
174
|
params: req.params,
|
173
175
|
headers: req.headers,
|
174
176
|
endpoint: ep,
|
177
|
+
files: req.files ?? null
|
175
178
|
};
|
176
179
|
let result;
|
177
180
|
try {
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { FileArray, UploadedFile } from "express-fileupload";
|
1
2
|
export interface TransferPacketVO<T> {
|
2
3
|
data?: T | null;
|
3
4
|
error?: IError | null;
|
@@ -25,6 +26,7 @@ export interface HTTPRequestVO<T = any> {
|
|
25
26
|
endpoint: string;
|
26
27
|
interceptorResult?: TransferPacketVO<any>;
|
27
28
|
precheck?: TransferPacketVO<any> | null;
|
29
|
+
files: FileArray | UploadedFile | null | undefined;
|
28
30
|
}
|
29
31
|
export interface IError {
|
30
32
|
code: number;
|