Commit 0d46d572 by 黄森林

移动端开发提交

parent e6a09777
package com.winsun.utils;
import com.winsun.constant.FilePath;
import lombok.extern.slf4j.Slf4j;
import java.io.FileOutputStream;
......@@ -17,14 +18,14 @@ public class PicturesUtil {
/**
* 上传图片
*
* <p>
* 前端传来图片必须为jpeg格式
*
* @param file 图片字符串
* @param path 图片文件夹名
* @return
*/
public static String uploadPictures(String file,String path) {
public static String uploadPictures(String file, String path) {
Date date = new Date();
SimpleDateFormat yyMM = new SimpleDateFormat("yyMM");
String y = yyMM.format(date.getTime());
......@@ -40,8 +41,7 @@ public class PicturesUtil {
* 2.解码成字节数组
*/
// filePath = FilePath.IDCARD.getValue() + y + "/" + h + "/" + path + "/" + date.getTime() + "." + houzhui;
filePath = "C:\\Users\\asus\\Desktop\\新建文件夹\\" + date.getTime()+ "." + houzhui;
filePath = FilePath.IDCARD.getValue() + y + "/" + h + "/" + path + "/" + date.getTime() + "." + houzhui;
Base64.Decoder decoder = Base64.getDecoder();
byte[] bytes = decoder.decode(base64Data);
FileOutputStream fos = null;
......
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