@xuda.io/drive_module 1.1.543 → 1.1.544

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 +15 -11
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -712,8 +712,9 @@ exports.update_drive_file = async function (req, job_id, headers, file_obj) {
712
712
  return {
713
713
  code: 760,
714
714
  data: {
715
- server_file_name: `https://${process.env.XUDA_HOSTNAME}/${req.drive_type === "studio" ? "uploads" : "drive"
716
- }${req.file_name}`,
715
+ server_file_name: `https://${process.env.XUDA_HOSTNAME}/${
716
+ req.drive_type === "studio" ? "uploads" : "drive"
717
+ }${req.file_name}`,
717
718
  filename: file_obj.originalname,
718
719
  },
719
720
  };
@@ -1287,7 +1288,7 @@ exports.extract_drive_file = async function (req, job_id, headers) {
1287
1288
 
1288
1289
  try {
1289
1290
  await db_module.save_app_couch_doc(app_id_reference, file_doc);
1290
- } catch (error) { }
1291
+ } catch (error) {}
1291
1292
  })
1292
1293
  .on("close", () => {
1293
1294
  console.log("Extraction complete.");
@@ -1332,7 +1333,7 @@ exports.delete_file_bulk = async function (req) {
1332
1333
 
1333
1334
  exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
1334
1335
  try {
1335
- const { drive_type, app_id, uid, make_public } = req;
1336
+ const { drive_type, app_id, uid, make_public, override } = req;
1336
1337
 
1337
1338
  /// validations
1338
1339
  validate_drive_type(drive_type);
@@ -1482,12 +1483,15 @@ exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
1482
1483
  break;
1483
1484
  }
1484
1485
 
1485
- let file_url = `https://${process.env.XUDA_HOSTNAME
1486
- }/${drive_type}-drive/${ref}${file_name.substr(0, 1) !== "/" ? "/" : ""
1487
- }${file_name}`;
1486
+ let file_url = `https://${
1487
+ process.env.XUDA_HOSTNAME
1488
+ }/${drive_type}-drive/${ref}${
1489
+ file_name.substr(0, 1) !== "/" ? "/" : ""
1490
+ }${file_name}`;
1488
1491
  if (["workspace"].includes(req.drive_type)) {
1489
- file_url = `https://${process.env.XUDA_HOSTNAME}/workspace-drive${file_name.substr(0, 1) !== "/" ? "/" : ""
1490
- }${file_name}`;
1492
+ file_url = `https://${process.env.XUDA_HOSTNAME}/workspace-drive${
1493
+ file_name.substr(0, 1) !== "/" ? "/" : ""
1494
+ }${file_name}`;
1491
1495
  }
1492
1496
 
1493
1497
  await fs_module.unlink(tempPath);
@@ -2043,7 +2047,7 @@ const get_file_info = async function (file_path) {
2043
2047
  const sizeOf = require("image-size");
2044
2048
  const dimensions = sizeOf(file_path);
2045
2049
  doc.dimensions = `${dimensions.width}x${dimensions.height}`;
2046
- } catch (error) { }
2050
+ } catch (error) {}
2047
2051
  return doc;
2048
2052
  };
2049
2053
 
@@ -2102,4 +2106,4 @@ const get_folder_docs = async function (dir, drive_type, app_id) {
2102
2106
  return docs;
2103
2107
  };
2104
2108
 
2105
- setTimeout(function () { }, 2000);
2109
+ setTimeout(function () {}, 2000);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.543",
3
+ "version": "1.1.544",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {