MCPcopy Index your code
hub / github.com/cloudfoundry/cli / createZipPartWriter

Function createZipPartWriter

cf/api/applicationbits/application_bits.go:176–183  ·  view source on GitHub ↗
(zipStats os.FileInfo, writer *multipart.Writer)

Source from the content-addressed store, hash-verified

174}
175
176func createZipPartWriter(zipStats os.FileInfo, writer *multipart.Writer) (io.Writer, error) {
177 h := make(textproto.MIMEHeader)
178 h.Set("Content-Disposition", `form-data; name="application"; filename="application.zip"`)
179 h.Set("Content-Type", "application/zip")
180 h.Set("Content-Length", fmt.Sprintf("%d", zipStats.Size()))
181 h.Set("Content-Transfer-Encoding", "binary")
182 return writer.CreatePart(h)
183}

Callers 1

writeUploadBodyMethod · 0.85

Calls 2

SizeMethod · 0.80
SetMethod · 0.65

Tested by

no test coverage detected