id summary reporter owner description type status priority milestone component version severity resolution keywords cc focuses 34064 Filter the file type error message kraftbj "When uploading a file type that is not permitted, the error `Sorry, this file type is not permitted for security reasons.` is returned. By adding a filter, a plugin/site admin can add a customized message. An example use case: A plugin that allows a front-end post submission system that allow file add-ons. By filtering the response, the author/admin can give more detailed specifications including allowable file types, if desired. Example function of the filter in psudocode: {{{ add_filter( 'upload_filetype_error', 'bk_test_error' ); function bk_test_error() { $allowed = get_allowed_mime_types(); $message = ""This type of file is not allowed! Please use one of the following: "" . implode( ', ', array_keys( $allowed ) ); return $message; } }}} " enhancement new normal Filesystem API normal