From 90c7f9cc2c85498f644c21f213cb2c9ce82f77ee Mon Sep 17 00:00:00 2001 From: zhengkunwang223 Date: Sun, 12 Mar 2023 11:40:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/router/ro_file.go | 3 ++- frontend/src/api/modules/files.ts | 4 ++++ frontend/src/views/host/file-management/upload/index.vue | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/backend/router/ro_file.go b/backend/router/ro_file.go index 3b0a1dd80..22628c4bb 100644 --- a/backend/router/ro_file.go +++ b/backend/router/ro_file.go @@ -26,7 +26,8 @@ func (f *FileRouter) InitFileRouter(Router *gin.RouterGroup) { fileRouter.POST("/content", baseApi.GetContent) fileRouter.POST("/save", baseApi.SaveContent) fileRouter.POST("/check", baseApi.CheckFile) - fileRouter.POST("/upload", baseApi.UploadChunkFiles) + fileRouter.POST("/upload", baseApi.UploadFiles) + fileRouter.POST("/chunkupload", baseApi.UploadChunkFiles) fileRouter.POST("/rename", baseApi.ChangeFileName) fileRouter.POST("/wget", baseApi.WgetFile) fileRouter.POST("/move", baseApi.MoveFile) diff --git a/frontend/src/api/modules/files.ts b/frontend/src/api/modules/files.ts index 35f60c654..dbd093f87 100644 --- a/frontend/src/api/modules/files.ts +++ b/frontend/src/api/modules/files.ts @@ -59,6 +59,10 @@ export const UploadFileData = (params: FormData, config: AxiosRequestConfig) => return http.upload('files/upload', params, config); }; +export const ChunkUploadFileData = (params: FormData, config: AxiosRequestConfig) => { + return http.upload('files/chunkupload', params, config); +}; + export const RenameRile = (params: File.FileRename) => { return http.post('files/rename', params); }; diff --git a/frontend/src/views/host/file-management/upload/index.vue b/frontend/src/views/host/file-management/upload/index.vue index 19a4bcb08..f36e8c4c1 100644 --- a/frontend/src/views/host/file-management/upload/index.vue +++ b/frontend/src/views/host/file-management/upload/index.vue @@ -39,7 +39,7 @@