Browse Source

fix bug

tags/v1.21.12.1
yuyuanshifu 5 years ago
parent
commit
6f08cff4ca
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      routers/repo/attachment.go

+ 14
- 0
routers/repo/attachment.go View File

@@ -398,6 +398,20 @@ func GetSuccessChunks(ctx *context.Context) {
attachID = attach.ID
}

if attach == nil {
ctx.JSON(200, map[string]string{
"uuid": fileChunk.UUID,
"uploaded": strconv.Itoa(fileChunk.IsUploaded),
"uploadID": fileChunk.UploadID,
"chunks": string(chunks),
"attachID": "0",
"datasetID": "0",
"fileName": "",
"datasetName": "",
})
return
}

dataset, err := models.GetDatasetByID(attach.DatasetID)
if err != nil {
ctx.ServerError("GetDatasetByID", err)


Loading…
Cancel
Save