gpt4 book ai didi

javascript - 媒体 uploader "uploading"同一图像的多个实例

转载 作者:行者123 更新时间:2023-11-28 01:10:01 27 4
gpt4 key购买 nike

当我选择一些图像并放入 WordPress 文件 uploader 时,该组的第一张图像此时似乎已正确上传,而其他图像则卡住且未得到处理。

但是,经过一段时间的等待,我停止了该进程,重新加载了浏览器选项卡,在“媒体”部分,出现了同一张图像的多个实例,顺便说一下,它们都有各自的 ID,并且比之前选择的图像数量还要多。

在FTP上查看,在上传文件夹中,有大量相同的图像,但后缀不同,似乎是文件数量的计数器。

发生的其他奇怪的事情是,即使在注销后,同一文件的某些实例也会出现,并且数量不断增长。

我已经安装了以下插件,除了这个奇怪的行为之外,一切都很好:

  • 联系表 7
  • 自定义内容类型管理器:高级自定义帖子类型
  • WooCommerce
  • 维护
  • 非常简单的验证码
  • WooCommerce Correios
  • 巴西的 WooCommerce 额外结帐字段
  • WooCommerce PagSeguro

最佳答案

经过一段时间寻找解决方案后,@brasofilo 建议我遵循指南,因为当前版本的 Wordpress (3.9) 发布时存在一些错误和误解。

我的问题是图像编辑器在我的主机上无法正常工作。在 WordPress 支持 ( http://wordpress.org/support/topic/http-error-on-media-upload-wp-39?replies=16 ) 的这个帖子中,一个人建议了这个小过滤器片段,它将图像编辑器返回到默认值:

<?php
/*
Plugin Name: Default to GD
Plugin URI: http://wordpress.org/extend/plugins/default-to-gd
Description: Sets GD as default WP_Image_Editor class.
Author: Mike Schroder
Version: 1.0
Author URI: http://www.getsource.net/
*/

function ms_image_editor_default_to_gd( $editors ) {
$gd_editor = 'WP_Image_Editor_GD';

$editors = array_diff( $editors, array( $gd_editor ) );
array_unshift( $editors, $gd_editor );

return $editors;
}
add_filter( 'wp_image_editors', 'ms_image_editor_default_to_gd' );
?>

然后,我的问题就解决了。

关于javascript - 媒体 uploader "uploading"同一图像的多个实例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24565468/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com