• 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

    (@nickboss)

    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

    (@mlmoreno)

    Thank you very much Nickola.

    The snippet works perfectly.
    Problem solved.

    Best regards.

    Thread Starter mlmoreno

    (@mlmoreno)

    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

    (@nickboss)

    Where do you want this to show? In the success message?

    Nickolas

    Thread Starter mlmoreno

    (@mlmoreno)

    Hi Nickola.

    Yes, the success message would be a good place to show the permalink.

    Thank you in advance.

    Kind regards.

    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

    (@mlmoreno)

    Hi @redsand78

    Have you tried the mime type audio/mp4?
    I read on https://mimetype.io/audio/m4a that audio/m4a is deprecated and they recommend using this.

    Best regards.

    Plugin Author nickboss

    (@nickboss)

    Good afternoon @mlmoreno , can you send me the shortcode of the upload form you use?

    Best Regards

    Nickolas

    Thread Starter mlmoreno

    (@mlmoreno)

    Hi @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%”

    Thank you very much.

    Best regards.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.