uploading PDFs and e-pub files

Community Forums Forums General Discussion uploading PDFs and e-pub files

This topic is: not resolved

Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by  Ipstenu 1 year, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #20083

    mark1mark
    Participant
    Post count: 3

    Hi, I am Mark from Litesites, I am setting up a site for a customer who wants to sell a “Start your own pet sitting business guide, Uploading a PDF for download after payment has been a breeze, I have tried to upload an e-pub file so customers have the opportunity of reading it like an iBook on a mobile device but I have a failure to upload notice “for security reasons.”

    Website is http://weloveourdogs.org

    anyone got a solution or idea about this?

    I appreciated any comment

    Mark

    #20830

    Ipstenu
    Participant
    Post count: 9

    You have to add it to your allowed mimes:


    add_filter('upload_mimes', 'add_custom_upload_mimes');
    function add_custom_upload_mimes($existing_mimes){
    $existing_mimes['epub'] = 'application/epub+zip'; //allow epub files
    return $existing_mimes;
    }

    I put it in an mu-plugin called sitewide-functions.php :)

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.