最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

uploads - MIME types not recognized by media library

programmeradmin1浏览0评论

We have several thousand MP3 files that were transferred to WP (from a dying Drupal site) via a custom script by the developer, with whom we don't have contact anymore. Wordpress, however, doesn't recognize those files' mime type:

The server (debian lamp stack) shows that the file has the correct mime time associated with it:

# file --mime-type 1-14_FNC.mp3
1-14_FNC.mp3: audio/mpeg

Is there a plugin or script that can go through these old files and assign the correct type within Wordpress? (needed to offload them onto s3 with another plugin, heh. That script fails with an empty mime type.)

We have several thousand MP3 files that were transferred to WP (from a dying Drupal site) via a custom script by the developer, with whom we don't have contact anymore. Wordpress, however, doesn't recognize those files' mime type:

The server (debian lamp stack) shows that the file has the correct mime time associated with it:

# file --mime-type 1-14_FNC.mp3
1-14_FNC.mp3: audio/mpeg

Is there a plugin or script that can go through these old files and assign the correct type within Wordpress? (needed to offload them onto s3 with another plugin, heh. That script fails with an empty mime type.)

Share Improve this question asked Oct 20, 2020 at 15:42 DeannaDeanna 1
Add a comment  | 

1 Answer 1

Reset to default 0

I was able to update the mime types via MySQL -- here's the update query I used:

UPDATE `wp_posts` SET `post_mime_type` = 'audio/mpeg' WHERE `post_name` LIKE '%mp3%' AND `post_mime_type` != 'audio/mpeg'

Setting this also made the correct metadata for the files appear, and the offload plugin worked as expected.

HURRAY

发布评论

评论列表(0)

  1. 暂无评论