@xuda.io/drive_module 1.1.640 → 1.1.642
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 +14 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -617,10 +617,23 @@ exports.update_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
617
617
|
const { drive_type, app_id, file_path, file_name, uid } = req;
|
|
618
618
|
validate_drive_type(drive_type);
|
|
619
619
|
|
|
620
|
-
|
|
620
|
+
const originalname = file_obj?.["originalname"];
|
|
621
|
+
|
|
622
|
+
if (!originalname) {
|
|
621
623
|
return { code: -4, data: "file data missing" };
|
|
622
624
|
}
|
|
623
625
|
|
|
626
|
+
let check_req = {
|
|
627
|
+
app_id,
|
|
628
|
+
uid,
|
|
629
|
+
drive_type,
|
|
630
|
+
file_name: originalname,
|
|
631
|
+
file_path: file_path,
|
|
632
|
+
};
|
|
633
|
+
const check_existing_file_ret = await module.exports.check_drive_file(
|
|
634
|
+
check_req
|
|
635
|
+
);
|
|
636
|
+
|
|
624
637
|
var target_file = path.join(file_path, file_name);
|
|
625
638
|
const master_id = await _common.get_project_app_id(app_id, true);
|
|
626
639
|
const tempPath = file_obj.path;
|