Skip to content

Commit

Permalink
update upload file handle (#141)
Browse files Browse the repository at this point in the history
* add breakpoint resume upload function

* upgrade chunks upload

* update upload file handle

* updade deoss

* add cacher and node selector config for user

* clean up the code

* update go mod

* solve all bugs found during debugging

* update save peer decorator method

* add node refresh and blacklist clear method call

* update upload file handle

---------

Co-authored-by: AstaFrode <frode@cess.one>
  • Loading branch information
jiuquxzy and AstaFrode authored Apr 25, 2024
1 parent 5fe13a8 commit b3541db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion node/putHandle.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ func (n *Node) putHandle(c *gin.Context) {
}
}

if blockNum != chunksInfo.BlockNum || blockIdx != chunksInfo.SavedBlockId+1 {
if blockNum > 0 && (blockNum != chunksInfo.BlockNum || blockIdx != chunksInfo.SavedBlockId+1) {
n.Upfile("err", fmt.Sprintf("[%v] %v", clientIp, "bad chunk index"))
c.JSON(http.StatusBadRequest, "bad chunk index")
return
Expand Down

0 comments on commit b3541db

Please sign in to comment.