首先,这个标题有很多疑问。我经历了所有但所有这些都无法解决我的问题。 在服务器上上传图片时出现错误
我尝试过的事情
上传目录权限为777。
我试图禁用所有插件并尝试上传,但是存在相同的问题
{"success":true,"data":{"id":805,"title":"fig2_full","filename":"fig2_full-9.jpg","url":"https:\/\/www.example.com\/wp-content\/uploads\/fig2_full-9.jpg","link":"https:\/\/www.example.com\/?attachment_id=805","alt":"","author":"1","description":"","caption":"Credit: \"Gemini Observatory Artwork by Lynette Cook\"\rArtist's conception of the multiple planet system, initially discovered with Gemini North adaptive optics images.","name":"fig2_full-12","status":"inherit","uploadedTo":804,"date":1568367804000,"modified":1568367804000,"menuOrder":0,"mime":"image\/jpeg","type":"image","subtype":"jpeg","icon":"https:\/\/www.example.com\/wp-includes\/images\/media\/default.png","dateFormatted":"September 13, 2019","nonces":{"update":"e79baa8268","delete":"7317ad662a","edit":"35b4b31ef2"},"editLink":"https:\/\/www.example.com\/wp-admin\/post.php?post=805&action=edit","meta":false,"authorName":"admin_dev","uploadedToLink":"https:\/\/www.example.com\/wp-admin\/post.php?post=804&action=edit","uploadedToTitle":"Auto Draft","filesizeInBytes":2442286,"filesizeHumanReadable":"2 MB","context":"","height":1860,"width":2652,"orientation":"landscape","sizes":{"thumbnail":{"height":150,"width":150,"url":"https:\/\/www.example.com\/wp-content\/uploads\/fig2_full-9-150x150.jpg","orientation":"landscape"},"medium":{"height":210,"width":300,"url":"https:\/\/www.example.com\/wp-content\/uploads\/fig2_full-9-300x210.jpg","orientation":"landscape"},"large":{"height":718,"width":1024,"url":"https:\/\/www.example.com\/wp-content\/uploads\/fig2_full-9-1024x718.jpg","orientation":"landscape"},"full":{"url":"https:\/\/www.example.com\/wp-content\/uploads\/fig2_full-9.jpg","height":1860,"width":2652,"orientation":"landscape"}},"compat":{"item":"","meta":""}}}
我在开发者控制台上的“网络”标签上选中时有此响应
实际上文件正在上载,但仍然显示此错误...当我刷新页面并检查显示的图像时。
附加参考图像,async-upload.php中的响应已损坏
答案 0 :(得分:0)
查看本文是否有帮助:https://sebastian.expert/fix-wordpress-an-error-occurred-in-the-upload-please-try-again-later/
还要检查Wordpress内存限制并通过添加此限制来增加它 定义('WP_MEMORY_LIMIT','256M'); 在wp-config.php文件中