1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

remove unused function

This commit is contained in:
Guillaume J. Charmes 2013-05-23 18:34:38 -07:00
parent e3f0429859
commit 2cd00a47a5

30
api.go
View file

@ -599,36 +599,6 @@ func postImagesGetCache(srv *Server, w http.ResponseWriter, r *http.Request, var
return nil
}
func Upload(w http.ResponseWriter, req *http.Request) {
mr, err := req.MultipartReader()
if err != nil {
return
}
length := req.ContentLength
for {
part, err := mr.NextPart()
if err == io.EOF {
break
}
var read int64
var p float32
for {
buffer := make([]byte, 100000)
cBytes, err := part.Read(buffer)
if err == io.EOF {
break
}
read = read + int64(cBytes)
//fmt.Printf("read: %v \n",read )
p = float32(read) / float32(length) * 100
fmt.Printf("progress: %v \n", p)
os.Stdout.Write(buffer)
}
}
}
func postBuild(srv *Server, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
if err := r.ParseMultipartForm(4096); err != nil {
return err