@xuda.io/drive_module 1.1.1209 → 1.1.1211
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 +3 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1111,7 +1111,7 @@ exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
1111
1111
|
type: 'file',
|
|
1112
1112
|
};
|
|
1113
1113
|
const check_existing_file_ret = await module.exports.check_drive_file(check_req);
|
|
1114
|
-
|
|
1114
|
+
debugger;
|
|
1115
1115
|
if (check_existing_file_ret.code < 0) {
|
|
1116
1116
|
const rename_file_name = async function (i) {
|
|
1117
1117
|
if (i > 1000) {
|
|
@@ -1575,7 +1575,8 @@ const upload_file_to_spaces = async function (tempPath, ref, drive_type, file_na
|
|
|
1575
1575
|
|
|
1576
1576
|
const params = {
|
|
1577
1577
|
Bucket: `${process.env.XUDA_HOSTNAME}/${drive_type}`, // Replace with your Space name
|
|
1578
|
-
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
|
|
1579
1580
|
Body: fileContent,
|
|
1580
1581
|
ACL: 'public-read', // Makes the file publicly accessible. Adjust the ACL according to your needs.
|
|
1581
1582
|
};
|