@xuda.io/drive_module 1.1.613 → 1.1.615
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/index.js +8 -6
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1379,12 +1379,6 @@ exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
1379
1379
|
const originalname = path.basename(file_obj.originalname);
|
|
1380
1380
|
const tempPath = file_obj.path;
|
|
1381
1381
|
|
|
1382
|
-
const { code: check_code, data: check_data } =
|
|
1383
|
-
await module.exports.check_drive_file({
|
|
1384
|
-
file_name: originalname,
|
|
1385
|
-
file_path,
|
|
1386
|
-
});
|
|
1387
|
-
|
|
1388
1382
|
if (
|
|
1389
1383
|
![..._conf.allowedExts_drive, ..._conf.archive_drive_ext].includes(ext)
|
|
1390
1384
|
) {
|
|
@@ -1424,6 +1418,14 @@ exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
1424
1418
|
};
|
|
1425
1419
|
doc = { ...doc, ...(await get_file_info(tempPath)) };
|
|
1426
1420
|
|
|
1421
|
+
const check_res = await module.exports.check_drive_file({
|
|
1422
|
+
file_name: doc.originalname,
|
|
1423
|
+
file_path: doc.file_path,
|
|
1424
|
+
});
|
|
1425
|
+
if (check_res.code < 0) {
|
|
1426
|
+
return check_res;
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1427
1429
|
switch (drive_type) {
|
|
1428
1430
|
case "studio": {
|
|
1429
1431
|
ref = await _common.get_project_app_id(req.app_id, true);
|