Преглед изворни кода

comments on attachment handler

master
Patrick Peng Sun пре 8 година
родитељ
комит
d5d9c793bb
1 измењених фајлова са 2 додато и 0 уклоњено
  1. +2
    -0
      server.go

+ 2
- 0
server.go Прегледај датотеку

io.Copy(f, file) 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) { func crmAttachmentHandler(w http.ResponseWriter, r *http.Request) {
fileID := getCrmFileID(r.URL.Path) fileID := getCrmFileID(r.URL.Path)
saveAs := GlobalPath.CRMAttachment + "crm_attach_" + fileID //add prefix for easy deleting saveAs := GlobalPath.CRMAttachment + "crm_attach_" + fileID //add prefix for easy deleting

Loading…
Откажи
Сачувај