|
@@ -10,6 +10,7 @@ import (
|
|
|
"encoding/json"
|
|
|
"os/exec"
|
|
|
"strings"
|
|
|
+ "path/filepath"
|
|
|
)
|
|
|
|
|
|
type Config struct {
|
|
@@ -63,7 +64,7 @@ func FileUploadHandle(w http.ResponseWriter, r *http.Request) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- filename = fp + "/" + filename
|
|
|
+ filename = filepath.Join(fp,filename)
|
|
|
f, err := os.Create(filename)
|
|
|
if err != nil {
|
|
|
log.Error("FileUploadHandle create file (%v) error ->(%v)", filename, err)
|