Multi part form data to upload image

Client requirnment is to upload an image(face) file using multi part form data.We implemented this using MIME.

But are receiving internal serror 500 and some times face is not detected.
If we test from Post Man we could see the response as url of uploaded image.

Any help is appreciated,any one implemented similar scenario or faced the same issue and got resolved.