good morning, here are instructions how to do it with the free version:
- Open the visual editor of the uploader form and set Allowed File Extensions like this: *.*, *.msg
- 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
Thank you very much Nickola.
The snippet works perfectly.
Problem solved.
Best regards.
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.
Where do you want this to show? In the success message?
Nickolas
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!
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.
Good afternoon @mlmoreno , can you send me the shortcode of the upload form you use?
Best Regards
Nickolas
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.