Can't upload assets in Craft 3 CMS
I know this is a while ago but I ran in to the same issue and thought I'd share the culprit in my particular case.

I adjusted the upload_max_filesize value via a php.ini file from the default 2MB to 10MB, but I misspelled the configuration as upload_max_filesize = 10MB instead of upload_max_filesize = 10M. I was seeing the exact same error as the original poster. Once I fixed the setting, changing 10MB to 10M, the error went away.