Commit 818c1654 authored by m1991's avatar m1991

登录模块——用户注册验证码 - 注册成功后 -验证码删除功能修复

parent 716729c3
......@@ -62,7 +62,7 @@ public class UploadServiceImpl implements UploadService {
* + ":" + request.getServerPort()+/upload/";"
*/
String basePath ="/upload/";
Long time = new Date().getTime();
Long time = System.currentTimeMillis();
String fileName = file.getOriginalFilename();//文件原始名称
String suffixName = fileName.substring(fileName.lastIndexOf("."));//从最后一个.开始截取。截取fileName的后缀名
......@@ -92,7 +92,8 @@ public class UploadServiceImpl implements UploadService {
resultMap.put("videoUrl", videoUrl);
resultMap.put("imgUrl", imgUrl);
resultMap.put("returnCode", 0);
resultMap.put("code", 0);
resultMap.put("msg","视频上传成功");
String zxUrl=videoUrl;
//System.out.println("上传的文件名为:"+fileName+",后缀名为:"+newFileName);
/**
......@@ -115,8 +116,6 @@ public class UploadServiceImpl implements UploadService {
*/
Long zxDate= System.currentTimeMillis();
// request.getScheme() + "://" + request.getServerName()
// + ":" + request.getServerPort()+"/upload/";
String basePath = "/upload/";
......@@ -175,6 +174,11 @@ public class UploadServiceImpl implements UploadService {
for (MultipartFile file : files) {
if (file.isEmpty()) {
System.out.println("上传图片为空,请重新上传");
Map map=new HashMap();
map.put("code",0);
map.put("msg","上传视频为空,请重新上传");
return map;
}
//判断上传文件格式
String fileType = file.getContentType();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment