aboutsummaryrefslogtreecommitdiff
path: root/go/storage
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2013-08-05 13:37:41 -0700
committerChris Lu <chris.lu@gmail.com>2013-08-05 13:37:41 -0700
commit54906c48f3c75e7ae62a2c1c72aa332b46d84568 (patch)
treea39423f958159a6703e3bbadeba32908a6cf0b66 /go/storage
parente94d52c1af1a97dfe849a70cf7fe6bec2fb5c97f (diff)
downloadseaweedfs-54906c48f3c75e7ae62a2c1c72aa332b46d84568.tar.xz
seaweedfs-54906c48f3c75e7ae62a2c1c72aa332b46d84568.zip
report errors when upload timeouts
Diffstat (limited to 'go/storage')
-rw-r--r--go/storage/needle.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/go/storage/needle.go b/go/storage/needle.go
index dfa7c9b26..831ca51fa 100644
--- a/go/storage/needle.go
+++ b/go/storage/needle.go
@@ -60,7 +60,12 @@ func NewNeedle(r *http.Request) (n *Needle, e error) {
e = errors.New("No file found!")
return
}
- data, _ := ioutil.ReadAll(part)
+ data, ioe := ioutil.ReadAll(part)
+ if ioe != nil {
+ e = ioe
+ log.Println("Reading Content [ERROR]", ioe)
+ return
+ }
dotIndex := strings.LastIndex(fname, ".")
ext, mtype := "", ""
if dotIndex > 0 {