@xuda.io/drive_module 1.1.567 → 1.1.568
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 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1535,17 +1535,14 @@ exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
1535
1535
|
}
|
|
1536
1536
|
};
|
|
1537
1537
|
exports.check_drive_file = async function (req, job_id, headers, file_obj) {
|
|
1538
|
-
const { drive_type, app_id, uid,
|
|
1538
|
+
const { drive_type, app_id, uid, originalname } = req;
|
|
1539
1539
|
var file_name, ref;
|
|
1540
1540
|
|
|
1541
1541
|
switch (drive_type) {
|
|
1542
1542
|
case "studio": {
|
|
1543
1543
|
ref = await _common.get_project_app_id(req.app_id, true);
|
|
1544
1544
|
const target_dir = path.join(_conf[`studio_drive_path`], ref);
|
|
1545
|
-
file_name = path.join(
|
|
1546
|
-
req.path.replace(target_dir, ""),
|
|
1547
|
-
file_obj.originalname
|
|
1548
|
-
);
|
|
1545
|
+
file_name = path.join(req.path.replace(target_dir, ""), originalname);
|
|
1549
1546
|
target_file = path.join(
|
|
1550
1547
|
req.path !== "/" ? req.path : target_dir,
|
|
1551
1548
|
originalname
|