2016-04-05 11 views
2

私はPDFファイルをアップロードできるようにelfinderプラグインを設定しようとしていますが、できません。allow pdf upload elfinder

エラー:この種のファイルは許可されていません。

マイコード:あなたの助けを

$opts = array(
    'roots' => array(
      array(
       'driver' => 'LocalFileSystem',   // driver for accessing file system (REQUIRED) 
       'path' => '../files/' . $id . '/',     // path to files (REQUIRED) 
       'URL' => dirname($_SERVER['PHP_SELF']) . '/files/' . $id . '/', // URL to files (REQUIRED) 
       'uploadDeny' => array('all'),    // All Mimetypes not allowed to upload 
       'uploadAllow' => array('image', 'text/plain', 'application/pdf'),// Mimetype `image` and `text/plain` allowed to upload 
       'uploadOrder' => array('deny', 'allow'),  // allowed Mimetype `image` and `text/plain` only 
       'accessControl' => 'access',      // disable and hide dot starting files (OPTIONAL) 
       'uploadMaxSize' => '10M'  
     ) 
    ) 
); 

感謝。

答えて

0

この配列をあなたのconfigのuploadAllowにマージします。

array('application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream')

これは、CodeIgniterののパントマイムのMIMEベースです

関連する問題