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

the example-file-upload is giving internal server error after submitting the file #4834

Closed
dip-sinha opened this issue Mar 10, 2020 · 3 comments
Labels
needs steps to reproduce Issues missing a small app and/or instructions for reproducing the problem

Comments

@dip-sinha
Copy link

Steps to reproduce

Current Behavior

Expected Behavior

Link to reproduction sandbox

Additional information

Related Issues

See Reporting Issues for more tips on writing good issues

@dip-sinha dip-sinha added the bug label Mar 10, 2020
@dip-sinha
Copy link
Author

Unhandled error in POST /file-upload: 500 Error: unknown format "binary" is used in schema at path "#/properties/file"
this is the error I am getting in console

@achrinza achrinza added the needs steps to reproduce Issues missing a small app and/or instructions for reproducing the problem label Mar 10, 2020
@achrinza
Copy link
Member

achrinza commented Mar 10, 2020

@dip-sinha, please publish a GitHub repo sandbox with a minimum lb4 app so that we can replicate the issue and examine the code. Otherwise it may be difficult for us to pinpoint the issue.

@achrinza achrinza added question and removed bug labels Mar 10, 2020
@raymondfeng
Copy link
Contributor

@dip-sinha The example depends on #4808, which is merged into master but not published to npm yet.

There are two options to try this example now:

  1. Check out strongloop/loopback-next github repo and run npm i under loopback-next to set up dependencies for examples/file-upload.

  2. In the example application.ts, add the following code to the constructor:

this.bind(RestBindings.REQUEST_BODY_PARSER_OPTIONS)
  .to({validation: {unknownFormats: ['binary']}});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs steps to reproduce Issues missing a small app and/or instructions for reproducing the problem
Projects
None yet
Development

No branches or pull requests

3 participants