Browse Source

提交代码,解决Bug

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.11.2^2
zouap 3 years ago
parent
commit
84523e9d58
2 changed files with 5 additions and 5 deletions
  1. +1
    -1
      routers/repo/ai_model_manage.go
  2. +4
    -4
      routers/repo/attachment.go

+ 1
- 1
routers/repo/ai_model_manage.go View File

@@ -227,7 +227,7 @@ func SaveLocalModel(ctx *context.Context) {
return
}
var lastNewModelId string
repoId := ctx.Repo.Repository.RepoID
repoId := ctx.Repo.Repository.ID
aimodels := models.QueryModelByName(name, repoId)
if len(aimodels) > 0 {
for _, model := range aimodels {


+ 4
- 4
routers/repo/attachment.go View File

@@ -738,6 +738,7 @@ func NewMultipart(ctx *context.Context) {

fileName := ctx.Query("file_name")
scene := ctx.Query("scene")
modeluuid := ctx.Query("modeluuid")

if setting.Attachment.StoreType == storage.MinioStorageType {
totalChunkCounts := ctx.QueryInt("totalChunkCounts")
@@ -753,10 +754,7 @@ func NewMultipart(ctx *context.Context) {
}

uuid := gouuid.NewV4().String()
modeluuid := ""
if scene == Attachment_model {
modeluuid = ctx.Query("modeluuid")
}

var uploadID string
var objectName string
if typeCloudBrain == models.TypeCloudBrainOne {
@@ -907,8 +905,10 @@ func CompleteMultipart(ctx *context.Context) {
typeCloudBrain := ctx.QueryInt("type")
fileName := ctx.Query("file_name")
scene := ctx.Query("scene")
modeluuid := ctx.Query("modeluuid")

log.Warn("uuid:" + uuid)
log.Warn("modeluuid:" + modeluuid)
log.Warn("scene:" + scene)
log.Warn("typeCloudBrain:" + strconv.Itoa(typeCloudBrain))



Loading…
Cancel
Save