|
|
@ -33,7 +33,7 @@ public class DeliverController { |
|
|
public JsonResponse<DeliverVo.DFile> addFile(HttpServletRequest request, HttpServletResponse response, |
|
|
public JsonResponse<DeliverVo.DFile> addFile(HttpServletRequest request, HttpServletResponse response, |
|
|
@RequestParam(required = true) Part file) throws Exception { |
|
|
@RequestParam(required = true) Part file) throws Exception { |
|
|
//1.上传文件
|
|
|
//1.上传文件
|
|
|
String allowedExts = "pdf,xls,xlsx,docx,txt,jpg,jpeg,doc,png,rar"; |
|
|
String allowedExts = "pdf,xls,xlsx,docx,txt,jpg,jpeg,doc,png,rar,md"; |
|
|
String dir = WebConstant.UPLOAD_PATH_BASE + File.separator + WebConstant.UPLOAD_PATH_DELIVER1; |
|
|
String dir = WebConstant.UPLOAD_PATH_BASE + File.separator + WebConstant.UPLOAD_PATH_DELIVER1; |
|
|
String path = UploadFileUtil_Servlet3.uploadFile(file, allowedExts, dir); |
|
|
String path = UploadFileUtil_Servlet3.uploadFile(file, allowedExts, dir); |
|
|
String filePath = WebConstant.UPLOAD_PATH_DELIVER1 + File.separator + path; |
|
|
String filePath = WebConstant.UPLOAD_PATH_DELIVER1 + File.separator + path; |
|
|
|