String[] data = null;
data = pic.split("base64,");
for(int i=1; i<data.length; iPP) {
String curFileName = IDUtil.genUUID()+suffix;
path = path + "/" + ymd + "/" + curFileName;
byte[] bs = Base64Utils.decodeFromString(new String(data[i].getBytes(),"utf-8"));
FileUtils.writeByteArrayToFile(new File(path), bs);
}
only part of the code is posted to parse the error report. I don"t know why. If you upload only one picture, you can parse and save the picture. But uploading two pictures will parse the error.