Authored by unknown

try

... ... @@ -13,7 +13,7 @@ public class MessageSenderConstant {
public static String PROJECT_REAL_PATH = "";
public static final String TEMP_FILE_PATH = "wechatImgFile/";
public static final String TEMP_FILE_PATH = "/wechatImgFile/";
public static final String IMG_SUFFIX = ".jpg";
... ...
... ... @@ -276,7 +276,7 @@ public class WechatServiceImpl implements IWechatService {
try {
//下载网络图片
String fileName = String.valueOf(System.currentTimeMillis()) + MessageSenderConstant.IMG_SUFFIX;
String pathFile = MessageSenderConstant.PROJECT_REAL_PATH + MessageSenderConstant.TEMP_FILE_PATH + fileName;
String pathFile = MessageSenderConstant.PROJECT_REAL_PATH + MessageSenderConstant.TEMP_FILE_PATH + File.separator + fileName;
HttpClientUtil.downFromPicUrl(customMsgBO.getSendContent(), MessageSenderConstant.PROJECT_REAL_PATH + MessageSenderConstant.TEMP_FILE_PATH, fileName);
//上传微信 获取 media_id
String addMediaUrl = getMediaUrl(accessToken);
... ...
... ... @@ -194,7 +194,7 @@ public class HttpClientUtil {
}
}
OutputStream os = new FileOutputStream(sf.getPath() + "\\" + filename);
OutputStream os = new FileOutputStream(sf.getPath() + File.separator + filename);
log.info("file down os is {}",os);
// 开始读取
while ((len = is.read(bs)) != -1) {
... ...