Unlike jpg
, pdf
, and png
files, dcm
files, by default, aren’t allowed to be uploaded by WordPress. You can add them to the allowed list using the upload_mimes
filter:
add_filter( 'upload_mimes', 'wpse409071_allow_dcm_uploads' );
function wpse409071_allow_dcm_uploads( $mimes ) {
$mimes['dcm'] = 'image/dicom';
return $mimes;
}
(I found the MIME type here: https://www.file-extensions.org/dcm-file-extension. You might need to ensure this is the correct MIME type for a dcm
file.)
Related Posts:
- How to generate thumbnails when needed only?
- Media files exist in upload folder but not showing up
- Set limit to media upload?
- Save camera info as metadata on image upload?
- How to upload SVG in WordPress 4.9.8?
- Use a separate custom table (not posts) to handle file upload data
- PNG with transparent background turns black when uploaded and resized
- Custom upload directory per CPT; when removed, file not deleted
- Modify featured image path to Amazon S3
- How to set an upload directory for each media type?
- How to get all files inserted (but not attached) to a post
- How to protect uploads in multisite if user is not logged in?
- Trigger JS when featured image upload window is opened in admin
- Modify the array of selected images in media modal
- How can I upload SVG images using the media uploader?
- Delete images uploaded by ‘Subscriber’ role
- Remove upload_files capability from a role but allow role to manage an avatar image
- 3.5 media manager add CSS / JS to new ‘tab’ iframe content
- post_id missing from the wp-admin file upload request
- Insert Featured image from Feed
- http error when uploading media files
- Image uploading stuck on “crunching”
- HTTP Error when uploading mp4 video file
- Change the size of the image preview on the media edit page
- “upload_mimes” filter not working. Need to allow WOFF and WOFF2
- Saving WordPress generated thumbnails in a subdirectory
- Add select field to media uploader that adds a class to the image
- Retroactively place uploaded media into -month, -year based folders?
- Can’t seem to upload a file to a custom directory
- wp.media add context
- Conditional add_filter for upload directory?
- Need to download uploaded binary file
- Insert Image automatically when upload finishes wordpress media uploader
- How do I modify the url of uploaded media content?
- WordPress “HTTP error.” when uploading Media – IIS
- WordPress uploads folder path. how it is decided?
- Limit upload file type on one custom post type
- Uploading images on front end doesn’t generate thumbnail sizes
- Filter / Hook to get attachment ID before uploading?
- Adding Media Upload to Custom Options Panel breaks “Insert into Post”
- PDF file upload issue
- WordPress bug with capabilities?
- Update image via WP REST API
- media_handle_upload() progress bar
- Media Library does not show the uploaded image
- Attach Thumbnail Generated from Video Upload as Featured Image for the Video
- ‘An error occurred in the upload. Please try again later.’ for users with different roles
- Manipulate CSV data during upload, is it possible?
- Check if uploaded file has a specific filename
- How to submit data between wp_iframe and backbone.js in media upload
- Uploading .mp3 files http error – 2 “exact” files one successful other fails
- HTTP Error after finishing uploading a video that is bigger than 64 MB -> After raising the upload limit manually in the wp-config file
- Set post_parent value for the images uploaded by Add Media button into post
- What are best practices to storing uploads in WordPress?
- Original image not saving?
- Restrict role to view own media
- Create featured image from a remote url when creating a post
- Using Add from Server to upload by post ID
- Patient portal using wordpress
- Stop image resizing in particular case – is that possible?
- Change the look of the media uploader
- Issue with images which have no sizes available
- Unable to upload file more than 1MB in size
- WordPress media upload issue could not insert attachment into the database
- Thumbnail images missing in WP media library
- Upload media (image) and set the category
- Using Windows Server 2012 How to Move Uploads Folder to another hard drive
- get_attached_file returns wrong path after changing media upload dir
- How to adapt upload_dir to save files outside of WP uploads folder
- wp_generate_attachment_metadata for non-images files
- wp_enqueue_media() and upload_mimes problem
- Reattach media after moving to another server
- What if I have a large file on the server that I want the wp library to have?
- Limit image upload to 10
- Bug: Deleting file, then uploading same file again places file in an old month folder
- Can i add custom meta box (Media Uploader) at Category Description
- Complicated image name like flickr does and deny access just to original image
- Parsing the post title to the media box page
- Problems with uploading pictures to WordPress
- Create multiple folders in upload media folder
- How to change Route respond To A specific Path?
- Where to store sensitive uploaded file?
- How to do action form from functions.php?
- Custom gallery displayin and sorting error
- Using WordPress’s add_cap method to Allow Contributors to Upload Media is not Working
- Access featured image URL based on media ID?
- Import all media referenced in posts
- How use custom upload directories in filesystem and url based on media type or category
- Site Icon upload and display in a theme
- Include file upload button inside post and process file
- get users nickname uploaded media
- How to configure WordPress to create thumbnails
- My deleted media exists jet
- owner/group issue on server
- Disable media upload in rich text editor
- How do I protect my uploads?
- WordPress shows different upload_max_filesize than php.ini setting
- Theme upload fails
- Retroactively change Permalinks for media files after disabling year/month format
- Create media folder upon post publish?