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 @@