之前下载的图片可能是错的 (服务器忙), 现在重新下载!

This commit is contained in:
life
2016-04-16 16:57:26 +08:00
parent 30394e4149
commit 72059d8fb3
6 changed files with 52 additions and 19 deletions

12
node_modules/file_main.js generated vendored
View File

@@ -109,9 +109,15 @@ var File = {
if(has && fileLocalPath) {
fs.exists(fileLocalPath, function(exists) {
if(exists) {
// console.log('本地存在');
callback(fileLocalPath);
// me.retImage(fileLocalPath, res);
if (fileLocalPath.indexOf('; charset=utf-8') < 0) {
// console.log('本地存在 ' + fileId);
callback(fileLocalPath);
}
else {
// 存在, 但之前存错了
console.log('存在, 但之前存错了 ' + fileId);
getImageFromApi();
}
} else {
getImageFromApi();
}