From 704caa4e794fa3c5688f45f5c8c923c3d311bccc Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Wed, 31 May 2023 08:53:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=96=AD=E7=82=B9=E7=BB=AD?= =?UTF-8?q?=E4=BC=A0=E5=B7=B2=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: acf6a6b6499f6a3136943007ba6bd2e54e3c5969 --- .../PCM-CORE/api/internal/handler/image/uploadimagehandler.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/adaptor/PCM-CORE/api/internal/handler/image/uploadimagehandler.go b/adaptor/PCM-CORE/api/internal/handler/image/uploadimagehandler.go index 11a43679..e72c4fb1 100644 --- a/adaptor/PCM-CORE/api/internal/handler/image/uploadimagehandler.go +++ b/adaptor/PCM-CORE/api/internal/handler/image/uploadimagehandler.go @@ -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