@xuda.io/drive_module 1.1.758 → 1.1.759
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 +3 -7
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -633,11 +633,13 @@ exports.delete_drive_files = async function (req) {
|
|
|
633
633
|
|
|
634
634
|
exports.update_drive_file = async function (req, job_id, headers, file_obj) {
|
|
635
635
|
try {
|
|
636
|
-
const { drive_type, app_id, file_path,
|
|
636
|
+
const { drive_type, app_id, file_path, uid } = req;
|
|
637
637
|
validate_drive_type(drive_type);
|
|
638
638
|
|
|
639
639
|
const originalname = file_obj?.["originalname"];
|
|
640
640
|
|
|
641
|
+
const file_name = path.basename(file_path);
|
|
642
|
+
|
|
641
643
|
if (!originalname) {
|
|
642
644
|
return { code: -4, data: "file data missing" };
|
|
643
645
|
}
|
|
@@ -781,12 +783,6 @@ exports.update_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
781
783
|
return {
|
|
782
784
|
code: -760,
|
|
783
785
|
data: "file not found",
|
|
784
|
-
// data: {
|
|
785
|
-
// server_file_name: `https://${process.env.XUDA_HOSTNAME}/${
|
|
786
|
-
// req.drive_type === "studio" ? "uploads" : "drive"
|
|
787
|
-
// }${req.file_name}`,
|
|
788
|
-
// filename: file_obj.originalname,
|
|
789
|
-
// },
|
|
790
786
|
};
|
|
791
787
|
}
|
|
792
788
|
} catch (err) {
|