You need to add the mime type to the whitelist of allowed file types.
Assuming this one still works, you can go the plugin route using.
http://wordpress.org/extend/plugins/pjw-mime-config/
Alternatively if you want to add your own mimes in code form, here’s an example.
add_filter( 'upload_mimes', 'your_custom_mimes' );
function your_custom_mimes( $mimes ) {
$mimes['extensionhere'] = 'mimetype/goes-here';
return $mimes;
}
Here’s a few helpful links to help with mime types.
http://en.wikipedia.org/wiki/Internet_media_type
http://www.webmaster-toolkit.com/mime-types.shtml
Related Posts:
- Why doesn’t update_post_meta work for certain strings?
- How can I add an image upload field directly to a custom write panel?
- Get page content using slug
- Where to store PHP files created by plugin / themes
- Checking if a file is already in the Media Library
- Standard location for plugin to save/cache files?
- Saving data-URI to media library
- What is the correct way to build a widget using OOP
- Can I use the wp media uploader for my own plugin?
- Change Media Uploader default directory
- Changing upload directory for plugin uploads only
- Upload file to remote storage
- Has anyone managed to integrate the wp_editor inside a widget?
- Two-step login process – Is it possible?
- Why are two functions over-riding each other?
- $wp_filesystem returns NULL. What are the dependencies?
- WordPress Media mime type filter problem 4.0
- How to store accumulate multiple option values in a single array using Options_API
- Admin-ajax.php appending a status code to ajax response
- Deleting images through upload folder, but not deleting from media library
- Using the component outside the editor. select(‘core’) is null
- Proper way to hook wp_get_attachment_url
- Getting Details Of Uploaded Image
- Sharing a common set of image files for media library, across all sites within multisite
- Uploading images from a custom page using blueimp uploader?
- Show dialog box in TinyMCE plugin and use WordPress php functions in it
- Hook to get image filename when it is uploaded
- How to send email in wordpress with more than one attachments
- How do I alter the comment form ‘allowed tags’ text in a plugin?
- How to restrict wp generate attachment metadata() to certain intermediate image sizes
- Using the default wordpress uploader inside plugin
- Files automatically added
- What filter should I use to insert a button inside on Media>Add New
- Changing upload dir in a plugin regardless of post type
- Applying OO patterns and principles to plugin development
- How to replicate Media Library “Add New” on Plugin Settings Page
- Plugin writing: access file that was just uploaded
- Custom delete option button in plugin settings
- Failed to Open Stream: Permission Denied While Writing to an XML File in a WordPress Plugin
- How to enable sorting in custom media uploader in plugin
- Create a new post using rest api and save featured image using an external image url
- How to upload a file to a folder named after the user_id via plugin
- Why is the temporary upload always 4.1K
- Can’t upload image using media_sideload_image
- Widget HTML Display Problem
- wordpress JSONAPI introspector always limits number at 10?
- Upload multiple images and insert them into custom html code
- Redirect to another page using contact form 7? [closed]
- wp_editor add media button not working
- zip unzip attachments in wordpress
- Make Database query only when option is updated
- Getting a WordPress Debug Strategy
- How to create a digital product download link that can’t be used twice?
- Can’t upload CSV file to plugin directory using custom upload form in admin panel
- Working of foreach loop with array
- How to submit/upload data to database and in specific folder?
- Cleaning a filename after image sideloading a url that contains `%20`
- Get audio metadata on file upload
- custom plugin with upload files does not work
- How to move an image in a plugin to the upload directory and make it as a media of wordpress?
- Adding Permalink to Slides with ‘Simple Nivo Slider’ plugin?
- Setting a post’s category
- post content and shortcode content displaying out of order
- “Rendering of admin template [path to template] failed”
- How to determine which capability to use?
- wp.media Uncaught TypeError: Cannot read properties of undefined (reading ‘state’)
- Problem with inserting multiple images in gallery of each WooCommerce product programmatically
- Insert and read media from the WordPress library and call in the plugin
- Trying to rename a file upload as the hash of file content on wordpress
- Home page is not loading, where in other pages are displaying on the site
- 500 Internal server error wp_handle_upload_prefilter
- WordPress5.2.3: Better File Download Plugin validation issue
- WordPress discards PNG file when uploading plugin file
- Hook for validating and rejecting frontend image upload
- Upload images from one server to an other in wordpress
- Changed media upload path for plugin, but generates error & shows wrong url
- foreach argument to get specific file types getting too many returns
- How to destroy or dispose wordpress uploder/manager?
- Displaying $_FILES data (simlar to $_POST)
- Changing upload directory for plugin uploads only
- How do you filter get_media_items by mime type in a custom media upload tab?
- Is it possible to convert various image types from remote URLs to WebP and then serve them immediately?
- upload script in plugin development [duplicate]
- How to automatically convert images to WebP on WordPress?
- wp_handle_upload – specified file failed upload test
- Leveraging Core Functionality in Icon Upload Plugin [closed]
- Upload to a specific media folder created by FileBird Lite
- Load images from CDN and custom features to “Add Media” dialogue
- upload image to wordpress media library failed for custom post type
- Make Categories and Tags required in admin
- How to iterate through custom posts and add the title to an array
- How to change the URL pattern for single post view
- Plugin Development sqlite or WordPress’ database
- How do I get around “Sorry, this file type is not permitted for security reasons”?
- how to get context information inside my funcion
- Convert canvas to image and upload image to server
- Multiple instances of $opt_name in redux framework
- Parsing webhook from Shopify in WordPress
- first_name property missing inside register_user action hook
- REST API error in block editor for custom templates