init: 0.1.0
feat: 基本功能有了 1. 分片上传 2. code 回显 3. 下载 todo: 断点上传
This commit is contained in:
@ -73,7 +73,7 @@ func ShareUpload() nf.HandlerFunc {
|
||||
rangeValidator := regexp.MustCompile(`^bytes=\d+-\d+$`)
|
||||
return func(c *nf.Ctx) error {
|
||||
code := strings.TrimSpace(c.Param("code"))
|
||||
if len(code) != 16 {
|
||||
if len(code) != opt.CodeLength {
|
||||
return c.Status(http.StatusBadRequest).JSON(map[string]string{"msg": "invalid file code"})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user