badmfck-api-server 4.1.7 → 4.1.8
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.
|
@@ -486,7 +486,8 @@ class APIService extends BaseService_1.BaseService {
|
|
|
486
486
|
else {
|
|
487
487
|
try {
|
|
488
488
|
if (data.file) {
|
|
489
|
-
const
|
|
489
|
+
const normalizedFile = process.platform === "win32" ? data.file : data.file.replaceAll("\\", "/");
|
|
490
|
+
const filePath = path_1.default.isAbsolute(normalizedFile) ? normalizedFile : path_1.default.resolve(normalizedFile);
|
|
490
491
|
const onSendFileError = (err) => {
|
|
491
492
|
(0, LogService_1.logError)("Can't send file: " + filePath);
|
|
492
493
|
if (!res.headersSent && !res.writableEnded) {
|