init: 0.0.8

feat: 实现了分片上传
todo:
  1. 上传完成后 code 回显
  2. 清理不用的临时 code file
  3. 断点续传
  4. 多 chunk 并发上传
This commit is contained in:
loveuer
2025-04-28 14:59:22 +08:00
parent fb96934abe
commit 7ec8cd5c0e
22 changed files with 1110 additions and 356 deletions

16
internal/opt/var.go Normal file
View File

@ -0,0 +1,16 @@
package opt
import "path/filepath"
const (
Meta = ".meta."
HeaderSize = "X-File-Size"
)
func FilePath(code string) string {
return filepath.Join(Cfg.DataPath, code)
}
func MetaPath(code string) string {
return filepath.Join(Cfg.DataPath, Meta+code)
}