PDF file upload issue

I amusing a plugin custom contact form where i have kept a file upload field at the front end. But when i try to uploa

I am using a plugin custom contact form where i have kept a file upload field at the front end. But when i try to upload a pdf file then neither tmp_name nor type property of $_FILES is being set. However other files like jpg/gih are being uploaded.

Need urgent help

I am using a plugin custom contact form where i have kept a file upload field at the front end. But when i try to upload a pdf file then neither tmp_name nor type property of $_FILES is being set. However other files like jpg/gih are being uploaded.

Need urgent help

Share Improve this question asked Oct 12, 2012 at 6:35 neerajneeraj 1113 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 1

You should set your MIME types for your pdf. 'application/pdf' and/or 'application/x-pdf'

sorry for the quick answer, no time to go into detail but this should get you on the way

expand the list of available file types for upload

function add_pdf_mime_type($mimes) {

                        $mimes['pdf'] = 'application/pdf';

                        return $mimes;
}  
add_filter('upload_mimes', 'add_pdf_mime_type');   

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745359543a4624296.html

相关推荐

  • PDF file upload issue

    I amusing a plugin custom contact form where i have kept a file upload field at the front end. But when i try to uploa

    8小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信