forked from jason/cpolis
		
	Fixed bug
This commit is contained in:
		@@ -413,8 +413,9 @@ func UploadImage(c *control.CliArgs) http.HandlerFunc {
 | 
			
		||||
		}
 | 
			
		||||
		defer file.Close()
 | 
			
		||||
 | 
			
		||||
		filename := fmt.Sprint(c.PicsDir, "/", time.Now().Format("2006-01-02_15:04:05"), "-", header.Filename)
 | 
			
		||||
		absFilepath, err := filepath.Abs(filename)
 | 
			
		||||
		filename := fmt.Sprint(time.Now().Format("2006-01-02_15:04:05"), "-",
 | 
			
		||||
			header.Filename)
 | 
			
		||||
		absFilepath, err := filepath.Abs(fmt.Sprint(c.PicsDir, "/", filename))
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			log.Println(err)
 | 
			
		||||
			http.Error(w, err.Error(), http.StatusInternalServerError)
 | 
			
		||||
@@ -435,8 +436,8 @@ func UploadImage(c *control.CliArgs) http.HandlerFunc {
 | 
			
		||||
			return
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		imgMD := fmt.Sprint("")
 | 
			
		||||
		tmpl, err := template.ParseFiles(c.WebDir + "/templates/editor.html")
 | 
			
		||||
		tmpl = template.Must(tmpl, err)
 | 
			
		||||
		tmpl.ExecuteTemplate(w, "editor-images", fmt.Sprint(""))
 | 
			
		||||
		template.Must(tmpl, err).ExecuteTemplate(w, "editor-images", imgMD)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user