Support » Developing with WordPress » Send Zip file as response rest API

  • Ashish Jangra


    Hey Folks

    We would like to send zip file as REST response. I have tried to set following header

    // Headers for an download:
    header(‘Content-type: application/zip’);
    header(‘Content-Disposition: attachment; filename=””‘);
    header(‘Content-Transfer-Encoding: binary’);
    // load the file to send:

    but its not working. I don’t want to send URL of zip file.

    Thank you in advance.

  • You must be logged in to reply to this topic.