pdf and doc file attachment in AnsPress wordpress plugin

2.19K viewsGeneralattachment doc pdf
0

Hi!

How can alow pdf and doc file attachment in AnsPress wordpress plugin.

deleted answer
1

Hello Muhammad,

 

I’m working on the same issue today. Here is the resolution to your issue. Add this to your child theme’s functions.php:

 

add_filter( ‘ap_allowed_mimes’, ‘ap_ma_additional_allowed_mimes’ );

function ap_ma_additional_allowed_mimes( $mimes ) {
$mimes[’pdf’] = ‘application/pdf’;

return $mimes;
}

 

I believe doc and docx are already allowed by default. You can check inĀ \wp-content\plugins\anspress-question-answer\includes\upload.php

 

Sorry for the backslashes if you are using Mac or Linux!

 

Let me know if you have any question.

 

Thanks,

 

@awijasa

You are viewing 1 out of 1 answers, click here to view all answers.