| @@ -19,6 +19,7 @@ func SetupConfig() { | |||
| "https://c.hitxy.org.au/", | |||
| "wechat", | |||
| "crmwechat.api"} | |||
| GlobalPath = PathsConfig{"/tmp"} | |||
| } | |||
| func AssertEqual(t *testing.T, a interface{}, b interface{}, message string) { | |||
| @@ -5,6 +5,14 @@ import ( | |||
| "net/http" | |||
| ) | |||
| //PathsConfig all system available pathes | |||
| type PathsConfig struct { | |||
| CRMAttachment string `json:"crm_attachmeng"` | |||
| } | |||
| //GlobalPath all global pathes configurations | |||
| var GlobalPath = PathsConfig{"/tmp/"} | |||
| func main() { | |||
| err := readConfig() //wechat API config | |||
| if err != nil { | |||
| @@ -187,3 +187,7 @@ func uploadHandler(w http.ResponseWriter, r *http.Request) { | |||
| defer f.Close() | |||
| io.Copy(f, file) | |||
| } | |||
| func crmAttachmentHandler(w http.Response, r *http.Request) { | |||
| http.ServeFile(w, r) | |||
| } | |||