| | |
| | | package service |
| | | |
| | | import ( |
| | | "basic.com/valib/logger.git" |
| | | "bufio" |
| | |
| | | "mime/multipart" |
| | | "os" |
| | | "os/exec" |
| | | "strconv" |
| | | "strings" |
| | | "webserver/extend/config" |
| | | "webserver/extend/util" |
| | |
| | | return true |
| | | } |
| | | //判断分块文件是否存在 |
| | | chunkFilePath := fileTmpPath+"/"+arg.Identifier+"_"+strconv.Itoa(arg.ChunkNumber) |
| | | chunkAlignNum := util.FormatNum(arg.TotalChunks, arg.ChunkNumber) |
| | | chunkFilePath := fileTmpPath+"/"+arg.Identifier+"_"+chunkAlignNum |
| | | if !util.Exists(chunkFilePath) { |
| | | return false |
| | | } |
| | |
| | | return false |
| | | } |
| | | } |
| | | fileSavePath := fileTmpPath+"/"+MD5Str+"_"+strconv.Itoa(arg.ChunkNumber) |
| | | chunkAlignNum := util.FormatNum(arg.TotalChunks, arg.ChunkNumber) |
| | | fileSavePath := fileTmpPath+"/"+MD5Str+"_"+chunkAlignNum |
| | | if util.Exists(fileSavePath) { |
| | | rmErr := os.Remove(fileSavePath) |
| | | if rmErr != nil { |