tools_batch_files 1.0.27 → 1.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/photoBatch.js +5 -1
package/package.json
CHANGED
package/src/photoBatch.js
CHANGED
@@ -472,11 +472,15 @@ const task = async (row, index) => {
|
|
472
472
|
progressIndex++;
|
473
473
|
logger("请求成功!");
|
474
474
|
logger(resData.data);
|
475
|
-
if(totals) {
|
475
|
+
if (totals) {
|
476
476
|
logger(`任务进度:${progressIndex}/${totals}`);
|
477
477
|
}
|
478
478
|
//删除文件夹
|
479
479
|
fs.rmdirSync(indexFilePath, { recursive: true });
|
480
|
+
} else if (resData.data.code === 300) {
|
481
|
+
//不捕获此错误
|
482
|
+
logger(`第${index}条文件-${index}重复上传!`);
|
483
|
+
fs.rmdirSync(indexFilePath, { recursive: true });
|
480
484
|
} else {
|
481
485
|
throw new Error("请求失败!" + resData.data.msg);
|
482
486
|
}
|