Browse Source

remove unused code

pull/2/head
Chris Lu 12 years ago
parent
commit
3afc2d2ce6
  1. 3
      go/operation/upload_content.go

3
go/operation/upload_content.go

@ -4,12 +4,10 @@ import (
"bytes" "bytes"
"encoding/json" "encoding/json"
"errors" "errors"
"path/filepath"
_ "fmt" _ "fmt"
"io" "io"
"io/ioutil" "io/ioutil"
"log" "log"
"mime"
"mime/multipart" "mime/multipart"
"net/http" "net/http"
) )
@ -31,7 +29,6 @@ func Upload(uploadUrl string, filename string, reader io.Reader) (*UploadResult,
log.Println("error copying data", err) log.Println("error copying data", err)
return nil, err return nil, err
} }
content_type := mime.TypeByExtension(filepath.Ext(filename))
content_type := body_writer.FormDataContentType() content_type := body_writer.FormDataContentType()
if err = body_writer.Close(); err != nil { if err = body_writer.Close(); err != nil {
log.Println("error closing body", err) log.Println("error closing body", err)

Loading…
Cancel
Save