diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/ApiFileResourceService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/ApiFileResourceService.java index 25a55b9031..7f543559e7 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/service/ApiFileResourceService.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/ApiFileResourceService.java @@ -366,7 +366,7 @@ public class ApiFileResourceService { try { fileId = fileMetadataService.transferFile(request.getFileName(), request.getProjectId(), request.getModuleId(), currentUser, bytes); } catch (Exception e) { - throw new MSException(Translator.get("file.transfer.error")); + throw new MSException(Translator.get("file.transfer.failed")); } return fileId; } diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugAttachmentService.java b/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugAttachmentService.java index 218704b2fd..51ef925fe7 100644 --- a/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugAttachmentService.java +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugAttachmentService.java @@ -210,7 +210,7 @@ public class BugAttachmentService { public String transfer(BugFileTransferRequest request, String currentUser) { BugLocalAttachment attachment = getLocalFile(request); if (attachment == null) { - throw new MSException(Translator.get("file.transfer.error")); + throw new MSException(Translator.get("file.transfer.failed")); } byte[] bytes = getLocalFileBytes(attachment, request.getProjectId(), request.getBugId()); String fileId; @@ -222,7 +222,7 @@ public class BugAttachmentService { // 删除本地上传的附件 deleteLocalFile(request.getBugId(), null, request.getProjectId(), null, attachment.getId(), null); } catch (Exception e) { - throw new MSException(Translator.get("file.transfer.error")); + throw new MSException(Translator.get("file.transfer.failed")); } return fileId; } diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseAttachmentController.java b/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseAttachmentController.java index c9d219d743..cf78ce8b4b 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseAttachmentController.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseAttachmentController.java @@ -136,7 +136,7 @@ public class FunctionalCaseAttachmentController { } catch (MSException e) { throw new MSException(e); } catch (Exception e) { - throw new MSException(Translator.get("file.transfer.error")); + throw new MSException(Translator.get("file.transfer.failed")); } return fileId;