@nger/fk-upload 1.0.216 → 1.0.217
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/dist/services/fk.service.js +12 -12
- package/package.json +1 -1
|
@@ -99,7 +99,7 @@ let FkService = class FkService {
|
|
|
99
99
|
[`Cookie`]: fkAccount.cookies
|
|
100
100
|
}
|
|
101
101
|
}).then(res => res.data);
|
|
102
|
-
if (info.code === 200) {
|
|
102
|
+
if (info && info.code === 200) {
|
|
103
103
|
let forceDirect = true;
|
|
104
104
|
if (download.size > 2097152) {
|
|
105
105
|
forceDirect = false;
|
|
@@ -219,19 +219,19 @@ let FkService = class FkService {
|
|
|
219
219
|
}).catch((e) => {
|
|
220
220
|
sub.error(e);
|
|
221
221
|
});
|
|
222
|
-
if (uploadResult
|
|
223
|
-
if (uploadResult.
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
222
|
+
if (uploadResult) {
|
|
223
|
+
if (uploadResult.code !== 200) {
|
|
224
|
+
if (uploadResult.data) {
|
|
225
|
+
const data = uploadResult.data;
|
|
226
|
+
if (data.limit) {
|
|
227
|
+
// to big
|
|
228
|
+
sub.error(`文件太大上传失败`);
|
|
229
|
+
break;
|
|
230
|
+
}
|
|
229
231
|
}
|
|
232
|
+
sub.error(new Error(uploadResult.msg));
|
|
233
|
+
break;
|
|
230
234
|
}
|
|
231
|
-
sub.error(new Error(uploadResult.msg));
|
|
232
|
-
break;
|
|
233
|
-
}
|
|
234
|
-
if (uploadResult) {
|
|
235
235
|
const data = uploadResult.data;
|
|
236
236
|
const fullDownUrl = data.fullDownUrl;
|
|
237
237
|
if (fullDownUrl) {
|