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

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

Binary file not shown.

@ -5,11 +5,17 @@ port = 8010
[savePath]
path= /usr/local/dsMin/dsSzxy/files/
[distribute] #发布功能的配置
ip = 10.10.14.175
port = 22
user = root
pwd = dsideal
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")
fmt.Print(logo)
//http://192.168.100.100:8010/static/upload.html
//http://192.168.100.100:8010/upload
//http://10.10.14.175:8010/dsSzxy/static/upload.html
//post
//controller注册
//上传文件
@ -68,8 +67,6 @@ func main() {
c.String(http.StatusBadRequest, fmt.Sprintf("upload file err: %s", err.Error()))
return
}
//拼接的下载路径
downUrl := "/dsSzxy/down/" + trueName[0:2] + "/" + trueName
//文件大小
content, err := ioutil.ReadFile(filename)
@ -125,7 +122,7 @@ func main() {
//返回
c.JSON(200, gin.H{
"success": true,
"url": downUrl,
"url": ConfigUtil.Download_prefix+trueName[0:2] + "/" + trueName,
"thumbContent": sourceString,
"size": size,
})
@ -134,7 +131,7 @@ func main() {
os.Remove(filename)
c.JSON(200, gin.H{
"success": true,
"url": downUrl,
"url": ConfigUtil.Download_prefix+trueName[0:2] + "/" + trueName,
"size": size,
})
}

Loading…
Cancel
Save