@xuda.io/drive_module 1.1.1208 → 1.1.1210

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 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -962,7 +962,8 @@ exports.extract_drive_file = async function (req, job_id, headers) {
962
962
  new_file_id = 'drv_' + app_id_master + '_' + (await _common.xuda_get_uuid(doc.drive_type)) + ext;
963
963
  }
964
964
 
965
- const folder_name = 'drive_folder_' + (doc.drive_type === 'studio' ? path.basename(fileName) : crypto.randomUUID());
965
+ // const folder_name = 'drive_folder_' + (doc.drive_type === 'studio' ? path.basename(fileName) : crypto.randomUUID());
966
+ const folder_name = 'drive_folder_' + (doc.drive_type === 'studio' ? path.basename(fileName) : _utils.UUID());
966
967
 
967
968
  var dir = path.dirname(fileName);
968
969
  if (dir && dir !== '.') {
@@ -1574,7 +1575,8 @@ const upload_file_to_spaces = async function (tempPath, ref, drive_type, file_na
1574
1575
 
1575
1576
  const params = {
1576
1577
  Bucket: `${process.env.XUDA_HOSTNAME}/${drive_type}`, // Replace with your Space name
1577
- Key: path.join(ref, crypto.randomUUID() + '_' + file_name), // File name you want to save as in Spaces
1578
+ // Key: path.join(ref, crypto.randomUUID() + '_' + file_name), // File name you want to save as in Spaces
1579
+ Key: path.join(ref, _utils.UUID() + '_' + file_name), // File name you want to save as in Spaces
1578
1580
  Body: fileContent,
1579
1581
  ACL: 'public-read', // Makes the file publicly accessible. Adjust the ACL according to your needs.
1580
1582
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.1208",
3
+ "version": "1.1.1210",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {