@xuda.io/drive_module 1.1.661 → 1.1.663

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.
Files changed (2) hide show
  1. package/index.js +4 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -42,6 +42,7 @@ const fs = require("fs");
42
42
  "delete_file_bulk",
43
43
  "search_drive_files",
44
44
  "check_drive_file",
45
+ "update_drive_file_tags",
45
46
  ].forEach((method) => {
46
47
  ["workspace", "studio", "user"].forEach((type) => {
47
48
  module.exports[method + "_" + type] = async function (
@@ -1389,7 +1390,7 @@ exports.delete_file_bulk = async function (req) {
1389
1390
 
1390
1391
  exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
1391
1392
  try {
1392
- const { drive_type, app_id, uid, make_public, check_exist } = req;
1393
+ const { drive_type, app_id, uid, make_public, tags = [] } = req;
1393
1394
 
1394
1395
  /// validations
1395
1396
  validate_drive_type(drive_type);
@@ -1437,6 +1438,7 @@ exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
1437
1438
  file_path: req.path || "/",
1438
1439
  size: stat.isFile() ? stat.size : 0,
1439
1440
  public: make_public,
1441
+ tags,
1440
1442
  };
1441
1443
  doc = { ...doc, ...(await get_file_info(tempPath)) };
1442
1444
 
@@ -1906,6 +1908,7 @@ exports.search_drive_files = async function (req) {
1906
1908
  var search_results = [];
1907
1909
 
1908
1910
  let selector = {
1911
+ type: "file",
1909
1912
  docType: `${drive_type}_drive`,
1910
1913
  stat: 3,
1911
1914
  $and: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.661",
3
+ "version": "1.1.663",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {