Spaces:
Paused
Paused
Commit
·
e24e4d2
1
Parent(s):
b66d95a
use app.post
Browse files- src/index.mts +2 -2
src/index.mts
CHANGED
@@ -24,7 +24,7 @@ app.use(express.json({limit: '50mb'}));
|
|
24 |
app.use(express.urlencoded({limit: '50mb', extended: true}));
|
25 |
app.use(fileUpload());
|
26 |
|
27 |
-
app.
|
28 |
if (activeRequests++ >= maxActiveRequests) {
|
29 |
return res.status(503).send("Service Unavailable");
|
30 |
}
|
@@ -59,7 +59,7 @@ app.use("/", async (req: Request, res: Response, _next: NextFunction) => {
|
|
59 |
// note: we don't need to read the result since this is a function having side effects on the file system
|
60 |
const result = await runColmap(options);
|
61 |
console.log("result:", result);
|
62 |
-
|
63 |
await createOutputArchive(outputTempDir);
|
64 |
|
65 |
res.download(path.join(outputTempDir, 'output.zip'), 'output.zip', (error) => {
|
|
|
24 |
app.use(express.urlencoded({limit: '50mb', extended: true}));
|
25 |
app.use(fileUpload());
|
26 |
|
27 |
+
app.post("/", async (req: Request, res: Response, _next: NextFunction) => {
|
28 |
if (activeRequests++ >= maxActiveRequests) {
|
29 |
return res.status(503).send("Service Unavailable");
|
30 |
}
|
|
|
59 |
// note: we don't need to read the result since this is a function having side effects on the file system
|
60 |
const result = await runColmap(options);
|
61 |
console.log("result:", result);
|
62 |
+
|
63 |
await createOutputArchive(outputTempDir);
|
64 |
|
65 |
res.download(path.join(outputTempDir, 'output.zip'), 'output.zip', (error) => {
|