@xuda.io/drive_module 1.1.494 → 1.1.496

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 +11 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1353,7 +1353,7 @@ exports.delete_file_bulk = async function (req) {
1353
1353
 
1354
1354
  exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
1355
1355
  try {
1356
- const { drive_type, app_id, uid } = req;
1356
+ const { drive_type, app_id, uid, make_public } = req;
1357
1357
 
1358
1358
  /// validations
1359
1359
  validate_drive_type(drive_type);
@@ -1400,6 +1400,7 @@ exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
1400
1400
  target_file,
1401
1401
  file_path: req.path,
1402
1402
  size: stat.isFile() ? stat.size : 0,
1403
+ public: make_public,
1403
1404
  };
1404
1405
  doc = { ...doc, ...(await get_file_info(tempPath)) };
1405
1406
 
@@ -1792,10 +1793,7 @@ exports.search_drive_files = async function (req) {
1792
1793
  }
1793
1794
 
1794
1795
  case "studio": {
1795
- const directoryPath = path.join(
1796
- _conf[`${drive_type}_drive_path`],
1797
- app_id
1798
- );
1796
+ const directoryPath = path.join(_conf[`studio_drive_path`], app_id);
1799
1797
 
1800
1798
  const options = {
1801
1799
  stat: false,
@@ -1874,6 +1872,14 @@ exports.get_drive_size = async function (req) {
1874
1872
  "/"
1875
1873
  );
1876
1874
 
1875
+ switch (drive_type) {
1876
+ case "user":
1877
+ break;
1878
+
1879
+ default:
1880
+ break;
1881
+ }
1882
+
1877
1883
  const size = await get_folder_size(directoryPath, drive_type, app_id);
1878
1884
 
1879
1885
  return { code: 200, data: size };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.494",
3
+ "version": "1.1.496",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {