@xuda.io/drive_module 1.1.1169 → 1.1.1171
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 +4 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -72,7 +72,7 @@ exports.get_drive_files = async function (req) {
|
|
|
72
72
|
let tags_query = {};
|
|
73
73
|
const sort_by_obj = {
|
|
74
74
|
name: [type === 'file' ? 'originalname' : 'folder_name'],
|
|
75
|
-
date: ['date_modified'
|
|
75
|
+
date: ['date_modified'],
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
if (!sort_by_obj[sort_by]) {
|
|
@@ -1051,15 +1051,15 @@ exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
1051
1051
|
try {
|
|
1052
1052
|
if (tags) tags_arr = tags.split(',');
|
|
1053
1053
|
} catch (error) {}
|
|
1054
|
-
const
|
|
1054
|
+
const ts = Date.now();
|
|
1055
1055
|
var doc = {
|
|
1056
1056
|
docType: `${drive_type}_drive`,
|
|
1057
1057
|
stat: 3,
|
|
1058
1058
|
originalname,
|
|
1059
1059
|
uid,
|
|
1060
1060
|
type: 'file',
|
|
1061
|
-
date_created:
|
|
1062
|
-
date_modified:
|
|
1061
|
+
date_created: ts,
|
|
1062
|
+
date_modified: ts,
|
|
1063
1063
|
ip: headers['cf-connecting-ip'],
|
|
1064
1064
|
country: headers['cf-ipcountry'],
|
|
1065
1065
|
file_ext: ext,
|