It will be great to be able to upload files with “application/deflate” and “application/gzip” while uploading file by Netlify API documentation .
I think it would save you descent amount of IO by reducing upload time; and with HTTP2 can replace zip file upload, I guess it will be efficient enough to do initial upload.
Actually - I am not sure we don’t handle it already. What happens when you post compressed as described in the first answer here (using the Content-Encoding header + compressing the file)?
Unfortunately zip doesn’t allow (well, makes life hard) stream processing.
I tried “application/gzip” content type, but let me check Content-Encoding. Nice hint.
Unfortunately Content-Encoding: gzip doesn’t work
I got {"code":422,"message":"No records matched"} if uncompressed file sha1 is provided
Or if I provide sha1 for gzipped file it is deployed
OK, thanks for doing that experiment for us! I filed a feature request and also asked our API team to take a look to see if they had any different suggestions than me, but if they don’t, I am not sure we’ll change the behavior anytime soon.
I suspect their advice will be “upload a zipfile of the whole site instead, in case a lot of the assets are compressible and it produces an overall savings in size to transmit”, and I know that isn’t what you’re hoping to hear. But, I’ll let you know if I hear anything else!