func IncomingMessageAttachment(w http.ResponseWriter, req *http.Request) {
	// Check ticket
	t, err := fetchTicketHeader(req)
	if err != nil {
		httputils.ErrorOut(w, http.StatusUnauthorized, invalidTicketID)
		return
	}

	vars := mux.Vars(req)
	messageID := vars["message"]

	err = message.StoreAttachment(t.ID, messageID, req.Body)
	if err != nil {
		httputils.ErrorOut(w, http.StatusInternalServerError, "error while storing message attachment")
		return
	}

	_ = httputils.JSONOut(w, http.StatusOK, httputils.StatusOk("saved message attachment"))
}
// IncomingMessageAttachment deals with uploading message attachments
IncomingMessageAttachment deals with uploading message attachments
// IncomingMessageAttachment deals with uploading message attachments
func IncomingMessageAttachment(w http.ResponseWriter, req *http.Request) {
	t, err := fetchTicketHeader(req)
	if err != nil {
		httputils.ErrorOut(w, http.StatusUnauthorized, invalidTicketID)
		return
	}
	vars := mux.Vars(req)
	messageID := vars["message"]
	err = message.StoreAttachment(t.ID, messageID, req.Body)
	if err != nil {
		httputils.ErrorOut(w, http.StatusInternalServerError, "error while storing message attachment")
		return
	}
	_ = httputils.JSONOut(w, http.StatusOK, httputils.StatusOk("saved message attachment"))
}
func IncomingMessageAttachment ( w http . ResponseWriter , req * http . Request ) { t , err := fetchTicketHeader ( req ) if err != nil { httputils . ErrorOut ( w , http . StatusUnauthorized , invalidTicketID ) return } vars := mux . Vars ( req ) messageID := vars [ " " ] err = message . StoreAttachment ( t . ID , messageID , req . Body ) if err != nil { httputils . ErrorOut ( w , http . StatusInternalServerError , " " ) return } _ = httputils . JSONOut ( w , http . StatusOK , httputils . StatusOk ( " " ) ) }
IncomingMessageAttachment deals with uploading message attachments
IncomingMessageAttachment deals with uploading message attachments
// Check ticket