This code would allow you to upload .bin
files.
/**
* Allow upload bin mime type
*/
add_filter( 'upload_mimes', 'wpse_287673_allow_upload_bin_mime_type', 1, 1 );
function wpse_287673_allow_upload_bin_mime_type( $mime_types ) {
$mime_types['bin'] = 'application/octet-stream';
return $mime_types;
}
This code is tested and is working for me, but it might be some differences for you since we are allowing files to be uploaded by extension and mime type and mime type of your file is defined by webserver.
Related Posts:
- More Fields & Media Upload
- Organizing the Media Library for Cleanup
- Trigger refresh for new media manager in 3.5
- Physical organization of wordpress media library (Real Media Library plugin)
- Extend Media Library
- How to show all available images in WP’s media library when using the Polylang plugin?
- Users can’t upload images on frontend if they haven’t got access to the wp backend
- Which filters or actions to use after a media upload and delete?
- Protecting direct access to PDF and ZIP unless user logged in (without plugin)
- How to restrict images in v3.5 Media Library modal to only those from a specific post id?
- Limit Media Library to Given Folder
- Why are double-periods (“..”) invalid in a WordPress image filename?
- How can I speed up a slow loading media library?
- Password protect some uploaded files, so only logged-in users can view them
- What to do with unattached logos and header uploaded via native wordpress uploader?
- Append button to WordPress Image Details modal
- Change URLs for static content
- uploading files to the uploads folder via ftp
- Add item to media library from blob or dataUrl
- add_image_size creating lots of images (of various sizes)
- WP3.5 Media Uploader – how to make it accept multiple images?
- Add new media uploader at frontend for wp 3.5+
- Trying to add filename over image in Media Browser
- View content from uploaded file in editor
- How to disable WordPress Media resize different size version?
- Media library storing files in uploads not folders within in uploads
- Is there a limit on the number of attachments?
- How to host different file formats/types for a media attachment without creating multiple attachments?
- Site icons with alpha channel for self-hosted WordPress blog network
- How to retrieve alt attribute for an attachment (uploaded image)?
- how to use media library [closed]
- Can I stop wordpress generating media sizes
- Cannot upload .mp3 file to wordpress media
- Replacing Images in Media Library
- How to upload unknown file type?
- Restrict WordPress Media Library for a specific user role (users can only see/select own media)
- Error uploading image in WordPress
- move_uploaded_file() not working on wordpress front end
- Stop WordPress from generating redundant image size
- WordPress 4.9.8 Trying to add filename over image in Media Browser
- Convert (-) and (escape) signs to (_) when uploading files on wordpress media library automatically
- wordpress media upload given An error occurred in the upload. Please try again later
- Using wp_enqueue_media() with switch_to_blog() issue
- How to get the return value of wp.media({ frame: ‘post’ }) in all cases?
- Media library only shows for admin. Doesn’t show editor or below [closed]
- WordPress Uploads Directory not using dates in links
- Multi Upload In Theme Options
- Redirect to another page using contact form 7? [closed]
- How to load attachment in media library for current user?
- How To Watermark Audio
- Resize existing library images
- Storing WordPress Media Library Uploaded files onto a separate domain
- Media Library Won’t Display Any Images
- A link (not in the post) to download a specific PDF file
- How to change format of file link ( Name ) when insert from media uploder
- Migrating media files (documents only) to a fresh install and maintaining the same directory structure
- How does wordpress handle media files?
- Set different max upload size limits based on file type/extension
- Correctly using the root directory for media uploads?
- What is the URL pattern for image thumbnails + sizes?
- get_attached_file returns wrong path after changing media upload dir
- Changing titles in Uploader for “Posts”
- How to detect when a file has been uploaded?
- What if I have a large file on the server that I want the wp library to have?
- Make inline uploader (plupload) on options page upload to a specific folder
- Multiple images are generated in WP-content in wordpress
- Removing extra large generated images disables all crops
- Can’t upload format files on media library
- How Do I Change the File Permission For Uploaded Files in WordPress?
- MIME types not recognized by media library
- Restrict Users to Only Edit Media Owned by Users in Their Role
- image not display in media library and thumbnail not display in post
- Images uploaded via Gutenberg image block are cropped
- Media Library: Remove replace images of selected author
- What is wrong with my wp_insert_attachment code?
- Bulk upload images in upload folder does not show in media library
- How to upload multiple images using WP rest API to media?
- Using Gravity Forms to upload media into library, then attach to post
- Import all media referenced in posts
- Redimension thumbnail crop without creating new images
- Issues with WordPress 3.9.6 media libraries on XAMPP
- How to configure WordPress to create thumbnails
- My deleted media exists jet
- Exclude some photos in media library
- Failed to load resource at admin screen
- Private file system for attachments
- How to split my uploaded media into directories?
- Metabox with file upload to custom directory
- How can I add a Description column to the media library browser screen?
- wordpress 3.6 media manager cropping timestamp
- Is there a way to force Featured image to show as attachement?
- Link or button to open the media manager from frontend
- Image uploaded in media library, can only see it when I using the WP Edit Image feature. 404 when trying to view in browser
- Automatically adding images to a certain page through the Media Uploader
- Bring up the media uploader on click
- Retroactively change Permalinks for media files after disabling year/month format
- How can comments be turned off for media attachments on WordPress?
- Question regarding the file path for media_sideload_image and wp_upload_dir()
- How do I restore attachment from files in wp-upload
- Image in binary in the data to WordPress media library