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

Get error message in json response #618

Open
Sh1ftOo opened this issue Feb 1, 2022 · 0 comments
Open

Get error message in json response #618

Sh1ftOo opened this issue Feb 1, 2022 · 0 comments

Comments

@Sh1ftOo
Copy link

Sh1ftOo commented Feb 1, 2022

I have flask backend and generate
return jsonify({'message': 'error'}, 500)

vue-dropzone doesn't get or see this response with status 500 and message

But if I write only status code return 500 without jsonify vue-dropzone understand that he gets error status code

How do I process json message with status code and show into the error box in vue-dropzone?

My dropzoneOptions:

dropzoneOptions: {
              url: axios.defaults.baseURL + '/images/upload',
              headers: { Authorization: `Bearer: ${ localStorage.getItem('token')}` },
              acceptedFiles: "image/*, .png,.jpg,.jpeg,.JPG,.heic",
              paramName: 'file',
              thumbnailWidth: 150,
              maxFilesize: 30,
              parallelUploads: 4
            }
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