Hi, when i define the schema consumer in endpoint /upload to 'multipart/form-data' for uploading file i dont know wich is the schema structure body for passing the base64 string or the file that i need to upload.
If y define the schema:
schema: {
description: 'Upload file',
tags: ['Info'],
consumes: [ 'multipart/form-data' ],
summary: 'Upload the file to the server',
body: {
type: 'object',
properties: {
file: {type: 'string'}
}
},
response: {
200: {
description: 'Succesful response',
type: 'boolean'
}
}
}
when i send the post get the error:
{
"statusCode": 400,
"error": "Bad Request",
"message": "body should be object"
}
I fetch in the dynamic.js code looking for the solution but i dont get with it.
Can you help me?
PD: Im sorry if this is not the place for this kind of issues.
Thx
Hi, when i define the schema consumer in endpoint /upload to 'multipart/form-data' for uploading file i dont know wich is the schema structure body for passing the base64 string or the file that i need to upload.
If y define the schema:
when i send the post get the error:
I fetch in the dynamic.js code looking for the solution but i dont get with it.
Can you help me?
PD: Im sorry if this is not the place for this kind of issues.
Thx