Title: Upload msg files
Last modified: September 20, 2024

---

# Upload msg files

 *  [mlmoreno](https://wordpress.org/support/users/mlmoreno/)
 * (@mlmoreno)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/upload-msg-files/)
 * Hi.
 * I need to upload msg files (outlook). This type of files are not allowed by WordPress,
   i have added a new mime type to solve this and i can upload the files from media
   library (backend), but when i try from frontend the system shows an error message
   because the type of file is not allowed.
 * I have installed the free version of the plugin, could i upload this type of 
   files? how?
 * Thanks in advance.
 * Best regards.

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/upload-msg-files/#post-18029203)
 * good morning, here are instructions how to do it with the free version:
    1. Open the visual editor of the uploader form and set Allowed File Extensions 
       like this: **\*.\*, \*.msg**
    2. You need to create a hook to declare the correct MIME type of msg files. You
       can do this by installing Code Snippets plugin. Then create a new snippet and
       add the following code in it:
 * `if (!function_exists('wfu_extensions_mime_types_handler')) {
    function wfu_extensions_mime_types_handler(
   $list) { $list['msg'] = array( 'application/vnd.ms-outlook' ); return $list; }
   add_filter('_wfu_extensions_mime_types', 'wfu_extensions_mime_types_handler',
   10, 1);}
 * Best Rergards
 * Nickolas
 *  Thread Starter [mlmoreno](https://wordpress.org/support/users/mlmoreno/)
 * (@mlmoreno)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/upload-msg-files/#post-18030132)
 * Thank you very much Nickola.
 * The snippet works perfectly.
   Problem solved.
 * Best regards.
 *  Thread Starter [mlmoreno](https://wordpress.org/support/users/mlmoreno/)
 * (@mlmoreno)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/upload-msg-files/#post-18031159)
 * Hi Nickola,
 * Sorry to bother you again.
   Is there any way to get the permalink of the uploaded
   file? I’ve seen that the plugin offers the possibility of displaying the path,
   but I would need the permalink.Thanks in advance.Kind regards.
 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/upload-msg-files/#post-18031302)
 * Where do you want this to show? In the success message?
 * Nickolas
 *  Thread Starter [mlmoreno](https://wordpress.org/support/users/mlmoreno/)
 * (@mlmoreno)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/upload-msg-files/#post-18032026)
 * Hi Nickola.
 * Yes, the success message would be a good place to show the permalink.
 * Thank you in advance.
 * Kind regards.
 *  [redsand78](https://wordpress.org/support/users/redsand78/)
 * (@redsand78)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/upload-msg-files/#post-18032055)
 * Hello, I’m having a similar problem uploading audio files recorded on IOS. They
   are formatted as .m4a and I recieve the following error message:
   _Error. This
   file was rejected because its MIME type is invalid. Its MIME type is: audio/x-
   m4a_
 * I followed your instructions for the *.msg files above, but still am seeing the
   same error on *.m4a uploads.
 * I’m happy to start another thread, but I figured I’d post here as it’s a similar
   issue. I have the pro version, btw.
 * Thanks!
 *  Thread Starter [mlmoreno](https://wordpress.org/support/users/mlmoreno/)
 * (@mlmoreno)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/upload-msg-files/#post-18032407)
 * Hi [@redsand78](https://wordpress.org/support/users/redsand78/)
 * Have you tried the mime type audio/mp4?
   I read on [https://mimetype.io/audio/m4a](https://mimetype.io/audio/m4a)
   that audio/m4a is deprecated and they recommend using this.
 * Best regards.
 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/upload-msg-files/#post-18038176)
 * Good afternoon [@mlmoreno](https://wordpress.org/support/users/mlmoreno/) , can
   you send me the shortcode of the upload form you use?
 * Best Regards
 * Nickolas
 *  Thread Starter [mlmoreno](https://wordpress.org/support/users/mlmoreno/)
 * (@mlmoreno)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/upload-msg-files/#post-18038662)
 * Hi [@nickboss](https://wordpress.org/support/users/nickboss/) yes of course:
 * [wordpress_file_upload uploadrole=”administrator,editor” uploadpatterns=”_*.*_,*.
   msg” createpath=”true” adminmessages=”true” placements=”filename+selectbutton
   +uploadbutton/progressbar/message” targetfolderlabel=”URL del archivo” successmessage
   =”Archivo %filename% cargado correctamente” warningmessage=”Archivo %filepath%\%
   filename% cargado pero con avisos” widths=”filename:350px, selectbutton:200px,
   uploadbutton:150px, progressbar:700px, message:700px” medialink=”true” postlink
   =”true”]
 * I am thinking if i add the url of my site to the success message, i would get
   the permalink, something like this: successmessage=”[https://my-site/wp-content/uploads/%filename%&#8221](https://my-site/wp-content/uploads/%filename%&#8221);
 * Thank you very much.
 * Best regards.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Upload msg files’ is closed to new replies.

 * ![](https://ps.w.org/wp-file-upload/assets/icon-256x256.png?rev=3252590)
 * [Iptanus File Upload](https://wordpress.org/plugins/wp-file-upload/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-file-upload/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-file-upload/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-file-upload/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-file-upload/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-file-upload/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [mlmoreno](https://wordpress.org/support/users/mlmoreno/)
 * Last activity: [1 year, 8 months ago](https://wordpress.org/support/topic/upload-msg-files/#post-18038662)
 * Status: not resolved