WordPress媒体库上传不了视频。怎么回事?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了WordPress媒体库上传不了视频。怎么回事?相关的知识,希望对你有一定的参考价值。

WordPress媒体库上传不了视频。怎么回事,视频大小也没有超过。说是什么文件不合法,,

参考技术A 修改wp-config.php文件,这个文件在WordPress的根目录下,在其中增加一行语句:
define(‘ALLOW_UNFILTERED_UPLOADS’, true);可以不限制上传类型,但是不太安全
参考技术B 你用的应该是主机吧?可能是主机商限制了上传文件的类型

markdown 修改和过滤WordPress媒体库和上传

Array
(
    [action] => query-attachments
    [post_id] => 838
    [query] => Array
        (
            [post_mime_type] => image
            [orderby] => date
            [order] => DESC
            [posts_per_page] => 40
            [_acfuploader] => field_579b87ce88001
            [paged] => 1
        )

)

Array
(
    [post_mime_type] => image
    [orderby] => date
    [order] => DESC
    [posts_per_page] => 40
    [paged] => 1
    [post_type] => attachment
    [post_status] => inherit,private
)

//$_POST['query']['_acfuploader'] holds the field key for the image field that popped up the media library.
**ACF PRO Files Field Custom Upload Directory**
https://www.ractoon.com/2016/08/wordpress-acf-pro-files-field-custom-upload-directory/

**WPSE/ How Can I Organize the Uploads Folder by Slug (or ID, or FileType, or Author)?**
https://wordpress.stackexchange.com/questions/25894/how-can-i-organize-the-uploads-folder-by-slug-or-id-or-filetype-or-author/53895#53895

**WPSE/ Restrictions on Media Library modal by ACF field**
https://stackoverflow.com/questions/38654423/different-restrictions-on-media-library-modal

**WPSE/ WordPress: Change directory upload based on user-edit page**
https://stackoverflow.com/questions/25187374/custom-meta-boxes-and-fields-for-wordpress-change-directory-upload-based-on-use

----

### Obtain Post ID or User ID

**WPSE/ How to obtain the user ID of the current profile being edited in WP-Admin?**
https://wordpress.stackexchange.com/questions/69461/how-to-obtain-the-user-id-of-the-current-profile-being-edited-in-wp-admin

**ACF support/ Getting the ID of the current post before wp_handle_upload_prefilter**
https://support.advancedcustomfields.com/forums/topic/getting-the-id-of-the-current-post-before-wp_handle_upload_prefilter/

----

### Error Logging and Debugging

**ACF support/ Error logging in posts_where filter**
https://support.advancedcustomfields.com/forums/topic/media-fields-dissapear-when-using-posts_where-and-posts_join/

**ACF support/ write attachment query to file**
https://support.advancedcustomfields.com/forums/topic/filter-gallery-items/

以上是关于WordPress媒体库上传不了视频。怎么回事?的主要内容,如果未能解决你的问题,请参考以下文章

qq空间上传的视频打不开怎么回事 可能有下面几个原因

markdown 修改和过滤WordPress媒体库和上传

php [将图像上传到媒体库]将图像上传到媒体库并将其设置为$ post_id(如果已指定)的特色图像。 #wordpress

苹果手机微信视频播放不了怎么回事

用FileZilla上传不了文件怎么回事?总是提示‘严重文件传输错误’?求解答

为啥QQ空间的视频看不了,怎么回事?