• I can’t believe it’s so complicated… I just want to add a zip in the post to let others to download an exe file, the app I’m talking about.
    First, WP didn’t allowed to upload that zip due to security reasons… OK, I created a folder wp-data/arc/ where the arc.zip is held. I included the direct link in the post, but clicking the link leads me to a 404 error page.
    How to let readers to download the zip??? I’m also wondering, how to attach a file to the post?? It seems to me that I can’t find any working solution described on the net…
    check out https://icefront.info/wp/blog/archives/42
    Thank you for your responses in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • Open up your functions.php file in your theme directory, paste this and try uploading again:

    add_filter('upload_mimes', 'custom_upload_mimes');
    function custom_upload_mimes ( $existing_mimes=array() ) {
        $existing_mimes['zip'] = 'application/zip';
        return $existing_mimes;
    }

    Hope this helps.

    Thread Starter icefront

    (@icefront)

    Thank you very much, it works fine!
    Note that if I put the files in any other folder than the standard post folder (this folder being wp-content/uploads/YYYY/mm), the download still isn’t working. Now I’m able to upload the zip when editing the post, and this way the zip becomes downloadable.

    great ??

    you can define the media-upload-path on your media settings page:

    wp-admin/options-media.php

    there you will find a checkbox with:

    Organize my uploads into month- and year-based folders
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘404 error for a zip included in post’ is closed to new replies.