文件断点续传已完成
Former-commit-id: acf6a6b6499f6a3136943007ba6bd2e54e3c5969
This commit is contained in:
parent
db8acc2e12
commit
704caa4e79
|
@ -7,7 +7,6 @@ import (
|
|||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"syscall"
|
||||
|
@ -62,7 +61,7 @@ func UploadImageHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
|
||||
}
|
||||
} else {
|
||||
destFile, _ := os.OpenFile(path.Join(chunksPath+"/"+hash+"-"+index), syscall.O_CREAT|syscall.O_WRONLY, 0777)
|
||||
destFile, _ := os.OpenFile(filepath.Join(chunksPath, hash+"-"+index), syscall.O_CREAT|syscall.O_WRONLY, 0777)
|
||||
reader := bufio.NewReader(file)
|
||||
writer := bufio.NewWriter(destFile)
|
||||
buf := make([]byte, 1024*1024) // 1M buf
|
||||
|
|
Loading…
Reference in New Issue