|
|
@ -56,9 +56,11 @@ func RegisterUploadMustPic(party router.Party, httpMethod string, path string, m |
|
|
|
var uploadfiles []string |
|
|
|
for _, file := range files { |
|
|
|
if !utils.ValueIsEmpty(file.Filename) { |
|
|
|
filename := strings.Split(file.Filename,".") |
|
|
|
filetype := filename[1] |
|
|
|
guid := utils.MakeOrderSn(user.Userid) |
|
|
|
filPath := "public/uploadfile/" + guid + ".jpg" |
|
|
|
savePath := "web/public/uploadfile/" + guid + ".jpg" |
|
|
|
filPath := "public/uploadfile/" + guid + "." +filetype |
|
|
|
savePath := "web/public/uploadfile/" + guid + "." +filetype |
|
|
|
// 上传文件至指定目录
|
|
|
|
err := utils.SaveUploadedFile(file, savePath) |
|
|
|
if err != nil { |
|
|
|