Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
·
ab89c61
1
Parent(s):
60b29ba
ok, this time it will work
Browse files- src/index.mts +4 -4
src/index.mts
CHANGED
@@ -3,7 +3,6 @@ import path from "node:path"
|
|
3 |
|
4 |
import { validate as uuidValidate } from "uuid"
|
5 |
import express from "express"
|
6 |
-
|
7 |
import { Video, VideoStatus, VideoAPIRequest, RenderRequest, RenderedScene, ImageAnalysisRequest, ImageAnalysisResponse } from "./types.mts"
|
8 |
|
9 |
import { parseVideoRequest } from "./utils/parseVideoRequest.mts"
|
@@ -33,13 +32,14 @@ main()
|
|
33 |
const app = express()
|
34 |
const port = 7860
|
35 |
|
36 |
-
app.use(express.json())
|
37 |
-
|
38 |
let isRendering = false
|
39 |
|
40 |
// fix this error: "PayloadTooLargeError: request entity too large"
|
|
|
|
|
|
|
41 |
app.use(express.json({limit: '50mb'}));
|
42 |
-
app.use(express.urlencoded({limit: '50mb'}));
|
43 |
|
44 |
// an image analyzing pipeline
|
45 |
app.post("/analyze", async (req, res) => {
|
|
|
3 |
|
4 |
import { validate as uuidValidate } from "uuid"
|
5 |
import express from "express"
|
|
|
6 |
import { Video, VideoStatus, VideoAPIRequest, RenderRequest, RenderedScene, ImageAnalysisRequest, ImageAnalysisResponse } from "./types.mts"
|
7 |
|
8 |
import { parseVideoRequest } from "./utils/parseVideoRequest.mts"
|
|
|
32 |
const app = express()
|
33 |
const port = 7860
|
34 |
|
|
|
|
|
35 |
let isRendering = false
|
36 |
|
37 |
// fix this error: "PayloadTooLargeError: request entity too large"
|
38 |
+
// there are multiple version because.. yeah well, it's Express!
|
39 |
+
// app.use(bodyParser.json({limit: '50mb'}));
|
40 |
+
//app.use(bodyParser.urlencoded({limit: '50mb', extended: true}));
|
41 |
app.use(express.json({limit: '50mb'}));
|
42 |
+
app.use(express.urlencoded({limit: '50mb', extended: true}));
|
43 |
|
44 |
// an image analyzing pipeline
|
45 |
app.post("/analyze", async (req, res) => {
|