@xuda.io/drive_module 1.1.1243 → 1.1.1245
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.mjs +11 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -645,7 +645,7 @@ export const update_drive_file = async (req, job_id, headers, file_obj) => {
|
|
|
645
645
|
|
|
646
646
|
export const create_drive_folder = async (req, job_id, headers) => {
|
|
647
647
|
try {
|
|
648
|
-
const { drive_type, app_id, folder_name, uid } = req;
|
|
648
|
+
const { drive_type, app_id, folder_name, uid, reserve } = req;
|
|
649
649
|
validate_drive_type(drive_type);
|
|
650
650
|
|
|
651
651
|
let folder_id;
|
|
@@ -666,7 +666,17 @@ export const create_drive_folder = async (req, job_id, headers) => {
|
|
|
666
666
|
is_folder: true,
|
|
667
667
|
type: 'directory',
|
|
668
668
|
file_path: req.path,
|
|
669
|
+
reserve,
|
|
670
|
+
};
|
|
671
|
+
|
|
672
|
+
let check_req = {
|
|
673
|
+
app_id,
|
|
674
|
+
uid,
|
|
675
|
+
drive_type,
|
|
676
|
+
file_path: path.join(doc.file_path, originalname),
|
|
677
|
+
type: 'file',
|
|
669
678
|
};
|
|
679
|
+
const check_existing_file_ret = await check_drive_file(check_req);
|
|
670
680
|
|
|
671
681
|
switch (drive_type) {
|
|
672
682
|
case 'studio': {
|