WordPress.org

Support

Support » How-To and Troubleshooting » Need to download uploaded binary file

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.

    URL: http://tinyurl.com/8xwfmbm

    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)
  • By feature, WP blocks certain types of files for security reasons. You can try adding this to your theme’s functions.php file

    <?php
    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.