Api upload through ZIP, but 'index.html' rendered as text

I have a very simple app, it’s just a static html file. When deploying as a drag-and-drop browser, it deploys and renders file. However, when deploying it as a ZIP through the API. The upload is successful, extraction is successful, but the webpage renders at a text file of html, instead of html.

The “successful” deploy can be viewed here.


Does anyone have any idea whats happened?

Here is the python code used to deploy the zip file

	headers = { 
	    "Content-Type": "application/zip",
	    "Authorization": "Bearer " + token

	shutil.make_archive('web', 'zip', './web')
	# Open the zip file just created, and read the binary contents
	data = open('web.zip','rb').read()
	url = f"https://api.netlify.com/api/v1/sites/{siteId}/deploys"

	# Using requests library, post the binary data
	r = requests.request('POST', url, headers=headers, data=data)

Hi @Gnutz,

There’s something definitely wrong going on with the zip. Here’s what I see as deployed files for that deploy:


That’s all! Would you be able to share the zip? Additionally, you can try to download the zip from the UI to see what you’re getting.