You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@ServerSettings({
rootDir,acceptMimes: ["application/json","multipart/form-data"],httpsPort: isPRD,// Versioningmount: {"/v1": [`${rootDir}/controllers/**/**Ctrl.ts`]},componentsScan: [`${rootDir}/services/*.ts`,`${rootDir}/repositories/*.ts`,`${rootDir}/protocols/*.ts`],},],// Docsswagger: [{path: "/v1/docs",doc: "api-v1"},]})exportclassServerextendsServerLoader{/** * This method let you configure the express middleware required by your application to works. * @returns {Server} */public$beforeRoutesInit(): void|Promise<any>{this.use(GlobalAcceptMimesMiddleware).use(cookieParser()).use(compress({})).use(methodOverride()).use(bodyParser.json()).use(bodyParser.urlencoded({extended: true}));}}
This is the call from Swagger (supposedly a FormData):
From Swagger UI ("Error: Bad Request" is mine, I'm checking in the code with if (!midia) throw...)
Side note: in docs about getting start with multer the command to install the package npm install --save @tsed/multer, doesn't work because it isn't found.
The text was updated successfully, but these errors were encountered:
Hello, I'm having trouble getting the a file from a request. It's very similar (if not the same) as this one: Gitter @trashtatur's problem
The function that retrieves the file (set in a controller)
My Server settings:
This is the call from Swagger (supposedly a FormData):
From Swagger UI ("Error: Bad Request" is mine, I'm checking in the code with
if (!midia) throw...
)The CURL
As you can see the boundary is beign set:
"Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryw9RTs1tnj4g5h2su"
This is the original code, I've removed to isolate the error:
I don't see anything that have much of diference from the example project
These are the dependencies:
λ node -v → v13.8.0
Side note: in docs about getting start with multer the command to install the package
npm install --save @tsed/multer
, doesn't work because it isn't found.The text was updated successfully, but these errors were encountered: