After upgrading from nextcloud 28 to 29, this error occurred when changing the theme

After upgrading from nextcloud 28 to 29, this error occurred when changing the theme

phpinfo has imagick

Because of the error application/x-empty i think the image has got the wrong format. Can you post the name of the image? I can not read it.

Please execute on the command line and maybe post:
file filename.suffix
(i think .suffix is not .jpg, .png, …)

You can also check it here: https://www.checkfiletype.com

Image format is ok, this is the background image I used before. In addition, I also tried other images, but they can’t be uploaded

If you have any questions, I can try to change it to English.

Please provide the requested image information which is shown if you execute the following commands:

file filename.suffix
file --mime filename.suffix

i trying run the with occ command ,but can not run it.
wraing :‘Command “file” is not defined’.
please tell to me where running these commands?
thanks

i try debug /apps/theming/lib/Controller/ThemingController.php

When debugging the $this->imageManager->updateImage function, I found the following error message

javascript is enabled

nextcloud.log

{"reqId":"rB5050MtrmVVWxLk9Dqn","level":3,"time":"2024-06-24T08:31:56+00:00","remoteAddr":"127.0.0.1","user":"adam","app":"index","method":"POST","url":"/apps/theming/ajax/uploadImage","message":"Unsupported image type: application/x-empty","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36","version":"29.0.2.2","exception":{"Exception":"Exception","Message":"Unsupported image type: application/x-empty","Code":0,"Trace":[{"file":"/Volumes/data/web/beta.nextcloud.ebf.cc/apps/theming/lib/Controller/ThemingController.php","line":282,"function":"updateImage","class":"OCA\\Theming\\ImageManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/Volumes/data/web/beta.nextcloud.ebf.cc/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"uploadImage","class":"OCA\\Theming\\Controller\\ThemingController","type":"->"},{"file":"/Volumes/data/web/beta.nextcloud.ebf.cc/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/Volumes/data/web/beta.nextcloud.ebf.cc/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/Volumes/data/web/beta.nextcloud.ebf.cc/lib/private/Route/Router.php","line":338,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/Volumes/data/web/beta.nextcloud.ebf.cc/lib/base.php","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/Volumes/data/web/beta.nextcloud.ebf.cc/index.php","line":49,"function":"handleRequest","class":"OC","type":"::"}],"File":"/Volumes/data/web/beta.nextcloud.ebf.cc/apps/theming/lib/ImageManager.php","Line":227,"message":"Unsupported image type: application/x-empty","exception":{},"CustomMessage":"Unsupported image type: application/x-empty"}}

You should improve your Linux knowledge. At some point you will get serious problems and will not be able to save your system. file is a Linux command and not an occ-command.

/usr/bin/file filename.suffix

I think the debug mode is not the same as the normal version. I think you get the error only because of the debug mode.