Commit 2c26232b by 黄森林

二维码bug修復

parent bf04a044
...@@ -38,15 +38,13 @@ public class PicturesUtil { ...@@ -38,15 +38,13 @@ public class PicturesUtil {
if (!multipartFiles[i].isEmpty()) { if (!multipartFiles[i].isEmpty()) {
String base64Data = multipartFiles[i].split(",")[1]; String base64Data = multipartFiles[i].split(",")[1];
String houzhui = multipartFiles[i].split(",")[0].split("/")[1].split(";")[0]; String houzhui = multipartFiles[i].split(",")[0].split("/")[1].split(";")[0];
/** String filePath1 = FilePath.IDCARD.getValue() + y + "/" + h + "/" + path;
* 2.解码成字节数组
*/
filePath = FilePath.BACKGROUNDIMG.getValue()+ "/" + y + "/" + h + "/" + path + "/" + date.getTime() + "." + houzhui;
String filePath1 = FilePath.BACKGROUNDIMG.getValue()+ "/" + y + "/" + h + "/" + path;
File dir = new File(filePath1); File dir = new File(filePath1);
if (!dir.exists()) { if (!dir.exists()) {
dir.mkdirs(); dir.mkdirs();
} }
filePath = FilePath.IDCARD.getValue() + y + "/" + h + "/" + path + "/" + date.getTime() + "." + houzhui;
//byte[] bytes = Base64.getUrlDecoder().decode(base64Data); //byte[] bytes = Base64.getUrlDecoder().decode(base64Data);
//byte[] bytes =new BASE64Decoder().decodeBuffer(base64Data); //byte[] bytes =new BASE64Decoder().decodeBuffer(base64Data);
//byte[] bytes = Base64.getDecoder().decode(base64Data); //byte[] bytes = Base64.getDecoder().decode(base64Data);
...@@ -70,6 +68,7 @@ public class PicturesUtil { ...@@ -70,6 +68,7 @@ public class PicturesUtil {
} }
} }
} }
return filePath; String enclosure = filePath.replace("enclosure", "api/manager/ciop");
return enclosure;
} }
} }
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