func addFileHandler(writer http.ResponseWriter, request *http.Request) {
	config.DebugLog("Request for: "+request.Method+" \"", request.URL.Path, "\"")
	err := request.ParseForm()
	if check(err, 500, &writer) {
		return
	}
	err = request.ParseMultipartForm(32 << 20)
	if check(err, 500, &writer) {
		return
	}
	vars := mux.Vars(request)
	fileType := vars["fileType"]
	fileName := vars["fileName"]
	file, _, err := request.FormFile("file")
	if check(err, 500, &writer) {
		return
	}
	defer file.Close()
	buf := new(bytes.Buffer)
	_, err = buf.ReadFrom(file)
	if check(err, 500, &writer) {
		return
	}
	ioutil.WriteFile("dalek/"+fileType+"/"+fileName, buf.Bytes(), 0664)
	config.DebugLog("Wrote file: " + fileType + " " + fileName)
	if fileType == "" && fileName == "manifest.json" {
		data, err := ioutil.ReadFile("dalek/manifest.json")
		config.ErrorLog(err)
		err = json.Unmarshal(data, &manifest)
		if check(err, 500, &writer) {
			return
		}
		if manifest.Runtime.Binary != "" {
			config.Log("Setting binary: " + manifest.Runtime.Binary)
			if check(err, 500, &writer) {
				return
			}
			err = util.CopyFile("dalek/"+manifest.Runtime.Binary, "../FRCUserProgram")
			if check(err, 500, &writer) {
				return
			}
		}
	}
	writer.WriteHeader(http.StatusOK)
	writer.Write([]byte("OK"))
}
func pullBinHandler(writer http.ResponseWriter, request *http.Request) {
	config.DebugLog("Request for: "+request.Method+" \"", request.URL.Path, "\"")
	err := request.ParseForm()
	if check(err, 500, &writer) {
		return
	}
	config.DebugLog(request.Form)
	config.DebugLog(request.PostForm)
	fileName := request.PostFormValue("fileName")
	if fileName == "" {
		err = errors.New("File name cannot be empty")
		if check(err, 500, &writer) {
			return
		}
	}
	config.DebugLog("Copying FRCUserProgram to : dalek/binaries/" + fileName)
	err = util.CopyFile("../FRCUserProgram", "dalek/binaries/"+fileName)
	if check(err, 500, &writer) {
		return
	}
	writer.WriteHeader(http.StatusOK)
	writer.Write([]byte("OK"))
}