remove types of upload from users

  1. 2 years ago

    hi,
    I wish to remove the "text" and "flash" upload options from upload.
    how can I do it?

  2. Web Fairy

    1 Oct 2015 Administrator
    Edited 2 years ago by Web Fairy

    open lib/engine.php like 76 (protected $mime_types) and delete that types,

    change it from

        protected $mime_types = array(
    
            'video' => array(
                'video/mp4' => 'mp4',
                'video/m4v' => 'm4v',
                'video/mov' => 'mov',
                'video/wmv' => 'wmv',
                'video/flv|video/x-flv' => 'flv',
            ),
    
            'audio' => array(
                'audio/wma' => 'wma',
                'audio/m4a' => 'm4a',
                'audio/mp3' => 'mp3',
                'audio/wav' => 'wav',
                'audio/mpeg' => 'mpeg',
                'audio/flv|audio/x-flv' => 'flv',
            ),
    
            'image' => array(
                'image/gif' => 'gif',
                'image/jpeg' => 'jpeg',
                'image/jpg' => 'jpg',
                'image/png' => 'png',
                'image/x-ms-bmp' => 'bmp',
            ),
    
            'flash' => array(
                'application/x-shockwave-flash' => 'swf',
            ),
    
            'compressed' => array(
                'application/x-bzip' => 'bz',
                'application/x-bzip2' => 'bz2',
                'application/zip' => 'zip',
                'application/x-rar-compressed' => 'rar',
            ),
    
            'text' => array(
                'application/x-sql' => 'sql',
                'text/plain' => 'txt',
            ),
    
        );

    to

        protected $mime_types = array(
    
            'video' => array(
                'video/mp4' => 'mp4',
                'video/m4v' => 'm4v',
                'video/mov' => 'mov',
                'video/wmv' => 'wmv',
                'video/flv|video/x-flv' => 'flv',
            ),
    
            'audio' => array(
                'audio/wma' => 'wma',
                'audio/m4a' => 'm4a',
                'audio/mp3' => 'mp3',
                'audio/wav' => 'wav',
                'audio/mpeg' => 'mpeg',
                'audio/flv|audio/x-flv' => 'flv',
            ),
    
            'image' => array(
                'image/gif' => 'gif',
                'image/jpeg' => 'jpeg',
                'image/jpg' => 'jpg',
                'image/png' => 'png',
                'image/x-ms-bmp' => 'bmp',
            ),
    
    
            'compressed' => array(
                'application/x-bzip' => 'bz',
                'application/x-bzip2' => 'bz2',
                'application/zip' => 'zip',
                'application/x-rar-compressed' => 'rar',
            ),
    
    
    
        );
 

or Sign Up to reply!

Health Flash