forked from jason/cpolis
Change filepaths to use filepath.Join() where possible
This commit is contained in:
@@ -25,7 +25,7 @@ func UploadEasyMDEImage(c *b.Config, s map[string]*Session) http.HandlerFunc {
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
filename, err := b.SaveImage(file, c.MaxImgHeight, c.MaxImgWidth, c.PicsDir+"/")
|
||||
filename, err := b.SaveImage(file, c.MaxImgHeight, c.MaxImgWidth, c.ImgDir)
|
||||
if err != nil {
|
||||
if err == b.ErrUnsupportedFormat {
|
||||
http.Error(w, "Das Dateiformat wird nicht unterstützt.", http.StatusBadRequest)
|
||||
@@ -57,7 +57,7 @@ func UploadImage(c *b.Config, s map[string]*Session, fileKey, htmlFile, htmlTemp
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
filename, err := b.SaveImage(file, c.MaxBannerHeight, c.MaxBannerWidth, c.PicsDir+"/")
|
||||
filename, err := b.SaveImage(file, c.MaxBannerHeight, c.MaxBannerWidth, c.ImgDir)
|
||||
if err != nil {
|
||||
if err == b.ErrUnsupportedFormat {
|
||||
http.Error(w, "Das Dateiformat wird nicht unterstützt.", http.StatusBadRequest)
|
||||
|
Reference in New Issue
Block a user