Getting error when uploading a Media

System Information
  • Strapi Version: 4.1.3
  • Operating System: Windows 10
  • Database: MySQL
  • Node Version: 16.3
  • NPM Version: 7.15.1
  • Yarn Version: 1.22.17


After creating a content type and then creating a media element, I upload an image (which is allowed), and it returns the following: Cannot read properties of undefined (reading ‘id’).

The page also goes completely blank. Url does not change.

The image is actually uploading, because if I leave the page and enter again it is there. Also checked the uploads folder and the image is successfuly uploaded.

Any help is appreciated. If you need any more information please let me know.


Some extra notes.

I had made it so that the media areas to allow only files and not images or videos. I think that is why it is going blank. Because if I upload a file, everything is fine. The same happens in another area where I do allow images but not files.

So I believe that maybe this is related to it “blocking” file types? But it should have a message or something instead of going blank.

I’m facing same error

When i upload image image file is empty and getting ApplicationError