Uploading pdf,doc file using titan framwork for wordpress

I am using titan framework for a WordPress project. It seems that only image files can be uploaded by upload metabox. Is there any way to upload other type of files like:PDF,doc.

Here is my code:

function create_upload_metabox(){
  $titan      = TitanFramework::getInstance("attached_file") ;
  $mb_upload  = $titan->createMetaBox(array(
                              "name"    => "Attachment",
                              "post_type"=> array('post','news'),
                            ));
  $mb_upload->createOption(array(
                  'name'  => 'Attachment',
                  'type'  => 'upload',
                  'id'    => 'mb_upload',
                  'desc'  => 'Attach a file' 
                )) ;

}
add_action('tf_create_options','create_upload_metabox');`

Related posts

Leave a Reply