Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow body schema when type is multipart #116

Open
ildukm opened this issue Dec 29, 2020 · 0 comments
Open

Allow body schema when type is multipart #116

ildukm opened this issue Dec 29, 2020 · 0 comments

Comments

@ildukm
Copy link

ildukm commented Dec 29, 2020

assert(/json|form/.test(spec.validate.type), text);

It throws error when I use type: 'multipart' with body schema.

Should it be allowed to parse multipart/form like below?

form.append('name', 'name');
form.append('image', image); // jpeg image

axios.post(url, form, { headers: { 'Content-type': 'multipart/form-data' });
ildukm added a commit to Ecube-Labs/joi-router that referenced this issue Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant