Browse Source

提交视频

pull/78/head
娄文智 3 years ago
parent
commit
ba802462ed
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      web/controllers/common/CommonUploadPic.rest.go

+ 4
- 2
web/controllers/common/CommonUploadPic.rest.go View File

@ -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 {


Loading…
Cancel
Save