I am following the walk through on https://www.netlify.com/docs/api/#endpoints to upload a zip file to deploy. I send the following requets to netlify. (my ‘website.zip’ file contains a single ‘index.html’ file). I am in the same directory as zip file when I run the following command.
curl -H "Content-Type: application/zip" \ -H "Authorization: Bearer xx-xxx-xxx" \ --data-binary "@website.zip" \ https://api.netlify.com/api/v1/sites/xxx-xxxx-xxx-xxxx/deploys
It goes through, and returns an object with the status, id, ect. However when I go into the admin UI, I see that my deploy failed. The message says ‘Deploy processing failed after 5 attempts’ and the log is below.
10:11:55 AM: Unpacking archive 10:11:56 AM: Unpacking archive 10:11:56 AM: Unpacking archive 10:11:56 AM: Unpacking archive 10:11:56 AM: Unpacking archive
I also tried an incorrect file location just for testing, and the UI then says ‘empty zip file’. Maybe this is the incorrect way to go about this. My entire mission is to let the user edit the html -> server builds a new zip archive with updated html -> use Netlify API to upload new zip file to production from server. Maybe I should be using the digest method instead? Any help or guidance is greatly appreciated!