fix(测试跟踪): 功能用例附件格式支持side
--bug=1010118 --user=李玉号 【测试跟踪】功能用例附件格式支持放开 https://www.tapd.cn/55049933/s/1169196
This commit is contained in:
parent
3793c29834
commit
94615dc69c
|
@ -5,7 +5,7 @@ public enum FileType {
|
|||
JPG(".jpg"), PNG(".png"), JPEG(".jpeg"), DOC(".doc"),
|
||||
XLSX(".xlsx"), DOCX(".docx"), JAR(".jar"), JS(".js"), TXT(".txt"),
|
||||
P12(".p12"), JKS(".jks"), PFX(".pfx"),
|
||||
DER(".der"), CER(".cer"), PEM(".pem"), CRT(".crt"),
|
||||
DER(".der"), CER(".cer"), PEM(".pem"), CRT(".crt"), SIDE(".side")
|
||||
;
|
||||
|
||||
// 保存后缀
|
||||
|
|
|
@ -43,6 +43,8 @@ import org.springframework.web.multipart.MultipartFile;
|
|||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -360,7 +362,7 @@ public class TestCaseController {
|
|||
byte[] bytes = fileService.loadFileAsBytes(fileOperationRequest.getId());
|
||||
return ResponseEntity.ok()
|
||||
.contentType(MediaType.parseMediaType("application/octet-stream"))
|
||||
.header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + fileOperationRequest.getName() + "\"")
|
||||
.header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + URLEncoder.encode(fileOperationRequest.getName(), StandardCharsets.UTF_8) + "\"")
|
||||
.body(bytes);
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<el-row>
|
||||
<el-col :span="20" :offset="1">
|
||||
<el-upload
|
||||
accept=".jpg,.jpeg,.png,.xlsx,.doc,.pdf,.docx,.txt,.json,.jmx"
|
||||
accept=".jpg,.jpeg,.png,.xlsx,.doc,.pdf,.docx,.txt,.json,.jmx,.side"
|
||||
action=""
|
||||
:show-file-list="false"
|
||||
:before-upload="beforeUpload"
|
||||
|
|
|
@ -2087,7 +2087,7 @@ export default {
|
|||
cancel_relevance_project: "Disassociating the project will also cancel the associated test cases under the project",
|
||||
img_loading_fail: "Image failed to load",
|
||||
pdf_loading_fail: "PDF loading failed",
|
||||
upload_tip: "Only jpg, jpeg, png, docx, doc, pdf, xlsx, txt, json, jmx files can be uploaded",
|
||||
upload_tip: "Only jpg, jpeg, png, docx, doc, pdf, xlsx, txt, json, jmx, side files can be uploaded",
|
||||
attachment: "Attachment",
|
||||
upload_time: "Upload Time",
|
||||
total: "Total Case",
|
||||
|
|
|
@ -2085,7 +2085,7 @@ export default {
|
|||
cancel_relevance_project: "取消项目关联会同时取消该项目下已关联的测试用例",
|
||||
img_loading_fail: "图片加载失败",
|
||||
pdf_loading_fail: "PDF加载失败",
|
||||
upload_tip: "只能上传jpg、jpeg、png、docx、doc、pdf、xlsx、txt、json、jmx文件",
|
||||
upload_tip: "只能上传jpg、jpeg、png、docx、doc、pdf、xlsx、txt、json、jmx、side文件",
|
||||
attachment: "附件",
|
||||
upload_time: "上传时间",
|
||||
total: "用例总数",
|
||||
|
|
|
@ -2085,7 +2085,7 @@ export default {
|
|||
cancel_relevance_project: "取消項目關聯會同時取消該項目下已關聯的測試用例",
|
||||
img_loading_fail: "圖片加載失敗",
|
||||
pdf_loading_fail: "PDF加載失敗",
|
||||
upload_tip: "只能上傳jpg、jpeg、png、docx、doc、pdf、xlsx、txt、json、jmx文件",
|
||||
upload_tip: "只能上傳jpg、jpeg、png、docx、doc、pdf、xlsx、txt、json、jmx、side文件",
|
||||
attachment: "附件",
|
||||
upload_time: "上傳時間",
|
||||
total: "用例總數",
|
||||
|
|
Loading…
Reference in New Issue