This commit is contained in:
Liang Ding 2015-02-13 14:08:35 +08:00
parent ad4c0cd896
commit 2e1f3e8f38
1 changed files with 2 additions and 7 deletions

View File

@ -67,15 +67,10 @@ func SaveHandler(w http.ResponseWriter, r *http.Request) {
bytes, _ := cmd.Output() bytes, _ := cmd.Output()
output := string(bytes) output := string(bytes)
if "" == output { if "" != output {
// format error, returns the original content code = string(output)
data["succ"] = true
data["code"] = code
return
} }
code = string(output)
data["code"] = code data["code"] = code
// Step2. generate file name // Step2. generate file name