Media upload does not work from FrontEnd in Divi Builder

Whenever I try to upload image using Divi frontend builder the site freezes and it works only on pressing the esc key.

I replaced all the Divi files but still the issue persists. Everything works fine when I upload the image from the backend editor.

Can you guys help me get the front-end editor working.