@xuda.io/drive_module 1.1.562 → 1.1.563
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 +2 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1537,6 +1537,7 @@ exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
1537
1537
|
exports.check_drive_file = async function (req, job_id, headers, file_obj) {
|
|
1538
1538
|
const { drive_type, app_id, uid, make_public, check_exist } = req;
|
|
1539
1539
|
var file_name, ref;
|
|
1540
|
+
|
|
1540
1541
|
switch (drive_type) {
|
|
1541
1542
|
case "studio": {
|
|
1542
1543
|
ref = await _common.get_project_app_id(req.app_id, true);
|
|
@@ -1550,13 +1551,10 @@ exports.check_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
1550
1551
|
originalname
|
|
1551
1552
|
);
|
|
1552
1553
|
|
|
1553
|
-
if (!(await fs_module.file_exists(target_dir))) {
|
|
1554
|
-
await fs_module.mkdir(target_dir, 0o775, true);
|
|
1555
|
-
}
|
|
1556
1554
|
if (await fs_module.file_exists(target_file)) {
|
|
1557
1555
|
return {
|
|
1558
1556
|
code: -762,
|
|
1559
|
-
data: "file
|
|
1557
|
+
data: "file exist",
|
|
1560
1558
|
};
|
|
1561
1559
|
}
|
|
1562
1560
|
|