Support » Fixing WordPress » Need to download uploaded binary file

  • Hi,

    I have uploaded a binary .war file which is nothing but a .zip file with Java web application extension. When I hit the URL for this file, I see junk characters in browsers.


    Need a way by which I can make the users download this file.

    By the way, I uploaded using FTP and the Add new media feature of WordPress gave me an error about File upload not supported due to security reasons.

    Pls. advise.

Viewing 1 replies (of 1 total)
  • Krishna



    By feature, WP blocks certain types of files for security reasons. You can try adding this to your theme’s functions.php file

    function custom_upload_mimes($mime_types)
        $mime_types['war'] = 'application/octet-stream';
        return $mime_types;
    add_filter('upload_mimes', 'custom_upload_mimes');
Viewing 1 replies (of 1 total)
  • The topic ‘Need to download uploaded binary file’ is closed to new replies.