From d5d9c793bb8d1948c2dee701229cf10476f23476 Mon Sep 17 00:00:00 2001 From: Patrick Peng Sun Date: Sat, 20 May 2017 19:36:22 +1000 Subject: [PATCH] comments on attachment handler --- server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server.go b/server.go index 893e30e..2ce8178 100644 --- a/server.go +++ b/server.go @@ -188,6 +188,8 @@ func uploadHandler(w http.ResponseWriter, r *http.Request) { io.Copy(f, file) } +//when user requst an attachment from our server, we get the file from CRM server and reply it back +//in this way, user has no 'direct-access' to the CRM server. func crmAttachmentHandler(w http.ResponseWriter, r *http.Request) { fileID := getCrmFileID(r.URL.Path) saveAs := GlobalPath.CRMAttachment + "crm_attach_" + fileID //add prefix for easy deleting