WordPress and the DCR file type
While working on the best way to put up sample dcr files for viewing on this site I tried to upload a dcr but I was rejected by WordPress. In pre 2.0 versions of WP uploads were handled on an upload page where you had the option to add new file types. This option has been removed (as far as I could tell) in WP2.
To get around this so you can easily upload dcr files you just have to open the wordpress/wp-admin/admin-functions.php file and add the dcr file type to the allowed types for uploading.
If you open that file, search for the line containing the swf file type (near the bottom), and add the dcr type below it, so it looks like this.
'swf' => 'application/x-shockwave-flash', 'dcr' => 'application/x-director',
I tested it once, so it must be OK…right? Now I’m playing with a popup window solution for displaying these, a ‘menu’ system of some sort, or just a direct link to the dcr. Since the last sounds easiest, I have a feeling I’ll go with that one. Simplicity…often the best answer.
4 comments February 26th, 2006