增加自动化代码文件组件

This commit is contained in:
piexlMax
2023-06-09 22:10:18 +08:00
parent a9d0531a56
commit b17b56dba0
11 changed files with 252 additions and 70 deletions

View File

@@ -94,15 +94,15 @@ func (e *FileUploadAndDownloadService) UploadFile(header *multipart.FileHeader,
if uploadErr != nil {
panic(err)
}
s := strings.Split(header.Filename, ".")
f := example.ExaFileUploadAndDownload{
Url: filePath,
Name: header.Filename,
Tag: s[len(s)-1],
Key: key,
}
if noSave == "0" {
s := strings.Split(header.Filename, ".")
f := example.ExaFileUploadAndDownload{
Url: filePath,
Name: header.Filename,
Tag: s[len(s)-1],
Key: key,
}
return f, e.Upload(f)
}
return
return f, nil
}