Wednesday, June 18, 2014

DICOM (dcm) files wont upload to Wordpress

Uploading DICOM files (*.dcm) files into Wordpress, may not work. For example using Visual Form Builder plugin for file upload, wont upload DICOM's. This is because wordpress and/or file upload plugins use wp_get_mime_types() function from wp-includes/functions.php to check mime type of the file being upload. Unfortunatly, dicom is not there. Thus it need to be added. To do this, just add 'dcm' => 'application/dicom', into wp_get_mime_types(). For example, as shown below:

No comments:

Post a Comment