@xuda.io/drive_module 1.1.655 → 1.1.656
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 +17 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2311,7 +2311,7 @@ const get_folder_docs = async function (dir, drive_type, app_id) {
|
|
|
2311
2311
|
|
|
2312
2312
|
exports.update_drive_file_tags = async function (req) {
|
|
2313
2313
|
try {
|
|
2314
|
-
const { drive_type, app_id, file_name_id, tags = [] } = req;
|
|
2314
|
+
const { drive_type, app_id, uid, file_name_id, tags = [] } = req;
|
|
2315
2315
|
validate_drive_type(drive_type);
|
|
2316
2316
|
|
|
2317
2317
|
let doc_ret;
|
|
@@ -2370,6 +2370,22 @@ exports.update_drive_file_tags = async function (req) {
|
|
|
2370
2370
|
var doc = {};
|
|
2371
2371
|
if (doc_ret.code > -1) {
|
|
2372
2372
|
doc = doc_ret.data;
|
|
2373
|
+
} else {
|
|
2374
|
+
if (drive_type === "studio") {
|
|
2375
|
+
doc = {
|
|
2376
|
+
docType: `${drive_type}_drive`,
|
|
2377
|
+
stat: 3,
|
|
2378
|
+
originalname: file_name_id,
|
|
2379
|
+
uid,
|
|
2380
|
+
type: "file",
|
|
2381
|
+
date_created: Date.now(),
|
|
2382
|
+
ip: headers["cf-connecting-ip"],
|
|
2383
|
+
country: headers["cf-ipcountry"],
|
|
2384
|
+
file_ext: ext,
|
|
2385
|
+
is_archive: _conf.archive_drive_ext.includes(ext) ? true : false,
|
|
2386
|
+
drive_type,
|
|
2387
|
+
};
|
|
2388
|
+
}
|
|
2373
2389
|
}
|
|
2374
2390
|
doc.date_modified = Date.now();
|
|
2375
2391
|
doc.tags = tags;
|