'commit'
continuous-integration/drone/push Build is passing Details

master
黄海 4 years ago
parent 6d2866997d
commit 32515fbdcb

Binary file not shown.

@ -5,7 +5,6 @@ port = 8010
[savePath] [savePath]
path= /usr/local/dsMin/dsSzxy/files/ path= /usr/local/dsMin/dsSzxy/files/
[distribute] #发布功能的配置 [distribute] #发布功能的配置
ip = 10.10.14.175 ip = 10.10.14.175
port = 22 port = 22
@ -13,3 +12,10 @@ user = root
pwd = dsideal pwd = dsideal
remotePath = /usr/local/dsMin/dsSzxy/ remotePath = /usr/local/dsMin/dsSzxy/
localPath = E:\Work\dsMin\dsSzxy\build localPath = E:\Work\dsMin\dsSzxy\build
[minio]
minio_endpoint = 10.10.14.231:9000
minio_accessKeyId = minioadmin
minio_secretAccessKey = minioadmin
minio_bucket = dsideal
download_prefix = http://10.10.14.231:9000/

Binary file not shown.

@ -38,8 +38,7 @@ func main() {
var logo = FileUtil.ReadFileContent("./Config/logo.txt") var logo = FileUtil.ReadFileContent("./Config/logo.txt")
fmt.Print(logo) fmt.Print(logo)
//http://192.168.100.100:8010/static/upload.html //http://10.10.14.175:8010/dsSzxy/static/upload.html
//http://192.168.100.100:8010/upload
//post //post
//controller注册 //controller注册
//上传文件 //上传文件
@ -68,8 +67,6 @@ func main() {
c.String(http.StatusBadRequest, fmt.Sprintf("upload file err: %s", err.Error())) c.String(http.StatusBadRequest, fmt.Sprintf("upload file err: %s", err.Error()))
return return
} }
//拼接的下载路径
downUrl := "/dsSzxy/down/" + trueName[0:2] + "/" + trueName
//文件大小 //文件大小
content, err := ioutil.ReadFile(filename) content, err := ioutil.ReadFile(filename)
@ -125,7 +122,7 @@ func main() {
//返回 //返回
c.JSON(200, gin.H{ c.JSON(200, gin.H{
"success": true, "success": true,
"url": downUrl, "url": ConfigUtil.Download_prefix+trueName[0:2] + "/" + trueName,
"thumbContent": sourceString, "thumbContent": sourceString,
"size": size, "size": size,
}) })
@ -134,7 +131,7 @@ func main() {
os.Remove(filename) os.Remove(filename)
c.JSON(200, gin.H{ c.JSON(200, gin.H{
"success": true, "success": true,
"url": downUrl, "url": ConfigUtil.Download_prefix+trueName[0:2] + "/" + trueName,
"size": size, "size": size,
}) })
} }

Loading…
Cancel
Save