Upload plugin giving error: Cannot read properties of null (reading 'split')

I am getting the following error from the Upload plugin when I load Media Library from the admin portal. When I load the Media Library page in the admin portal, the screen flashes and then turns blank with the below error in the console.
The JavaScript is minified so it is difficult to debug. I am also running the Azure blob storage community plug in by Jake Feldman, but I don’t think that is an issue. I have had trouble ever since I updated to 4.0.7 from 4.0.0.

       TypeError: Cannot read properties of null (reading 'split')
    at p (main.940c6c72.js:2:1225604)
    at li (main.940c6c72.js:2:2202187)
    at $u (main.940c6c72.js:2:2254484)
    at kl (main.940c6c72.js:2:2241725)
    at Pl (main.940c6c72.js:2:2241653)
    at Sl (main.940c6c72.js:2:2241516)
    at Ol (main.940c6c72.js:2:2238482)
    at main.940c6c72.js:2:2187979
    at t.unstable_runWithPriority (main.940c6c72.js:2:2388775)
    at Vo (main.940c6c72.js:2:2187756)
System Information
  • Strapi Version: 4.0.7
  • Operating System: Ubuntu 20.04.3 LTS
  • Database: PG 13.4
  • Node Version: v12.22.7
  • NPM Version: 6.14.15
  • Yarn Version: 1.22.17

1 Like

some issue.manual upload is fine.using api upload will broken the site
@strapi/strapi”: “4.1.2”,
@strapi/plugin-users-permissions”: “4.1.2”,
@strapi/plugin-i18n”: “4.1.2”,
“sqlite3”: “5.0.2”

find the solution:
when upload image we need add " mime-type "

in python something like:

multipart_form_data = {
    'upload': ('custom_file_name.png', open('myfile.png', 'rb'),"image/png"),


1 Like