feat: switch upload hash to md5

This commit is contained in:
2026-01-08 15:40:48 +08:00
parent 6ffe58ffb4
commit 7f162b7c45
8 changed files with 348 additions and 8 deletions

View File

@@ -59,7 +59,7 @@ func (c *Common) GetOptions(ctx fiber.Ctx) (*dto.OptionsResponse, error) {
// @Tags Common
// @Accept json
// @Produce json
// @Param hash query string true "File Hash"
// @Param hash query string true "File MD5 Hash"
// @Success 200 {object} dto.UploadResult
// @Bind user local key(__ctx_user)
// @Bind hash query

View File

@@ -1,7 +1,7 @@
package dto
type UploadInitForm struct {
// Hash 文件哈希(用于秒传校验)。
// Hash 文件 MD5 哈希(用于秒传校验)。
Hash string `json:"hash"`
// Size 文件大小(字节)。
Size int64 `json:"size"`