Add TGZ as upload mime type
Some of us are posting Linux archives and tgz is a standard MIME type for that file. I have added the following to wp-includes/functions-post.php wp_check_filetype():
'tar' => 'application/x-tar',
'zip' => 'application/zip',
'gz|gzip' => 'application/x-gzip',
'tgz' => 'application/x-tar-gz', // djd added tgz type
'exe' => 'application/x-msdownload'
Maybe there is an option to modify this or a plugin to modify this list, but I didn’t see one. Maybe I’ll investigate adding a plugin to add types if there is a hook already built in. Is the ‘upload-mimes’ symbol some sort of hook for adding types?
- The topic ‘Add TGZ as upload mime type’ is closed to new replies.