[wp-trac] [WordPress Trac] #65057: For our use of WordPresswe need to be able to upload and manage .dwg and .dwt files

WordPress Trac noreply at wordpress.org
Fri Apr 10 06:44:42 UTC 2026


#65057: For our use of WordPresswe need to be able to upload and manage .dwg and
.dwt files
-----------------------------+------------------------------
 Reporter:  ahjelmqv         |       Owner:  (none)
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Upload           |     Version:  6.9.4
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------------
Changes (by dd32):

 * component:  General => Upload


Old description:

> To be able to upload tech drawings, I appended two rows in wp/wp-
> includes/functions.php to allow .dwg and .dwt files to be recognized and
> allowed.
> Would be nice to have them included in core if there is no risks with
> allowing.
>
> --
> # within file     wp/wp-includes/functions.php
>

> function wp_get_mime_types() {
>
>         return apply_filters(
>                 'mime_types',
>                 array(
> ...
>                         'dwg'                          =>
> 'image/vnd.dwg',
>                         'dwt'                          =>
> 'application/x-autocad',
> ...
>
>                 )
>         );
> }

New description:

 To be able to upload tech drawings, I appended two rows in wp/wp-
 includes/functions.php to allow .dwg and .dwt files to be recognized and
 allowed.
 Would be nice to have them included in core if there is no risks with
 allowing.

 {{{
 # within file     wp/wp-includes/functions.php


 function wp_get_mime_types() {

         return apply_filters(
                 'mime_types',
                 array(
 ...
                         'dwg'                          => 'image/vnd.dwg',
                         'dwt'                          =>
 'application/x-autocad',
 ...

                 )
         );
 }
 }}}

--

Comment:

 Hi @ahjelmqv,

 Generally use of a plugin to enable less-common file mime types is best,
 as not every file type can be included in WordPress.

 In general, use of a plugin to enable site-specific mime-types is the best
 route for most people.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/65057#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list