@xuda.io/drive_module 1.1.484 → 1.1.485

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 +6 -6
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -95,7 +95,7 @@ exports.get_drive_files = async function (req) {
95
95
  const files = {
96
96
  path: req.path || "/",
97
97
  name: file_doc.data.folder_name || "/",
98
- size: 0,
98
+ // size: 0,
99
99
  sizeInBytes: 0,
100
100
  children: [],
101
101
  };
@@ -103,7 +103,7 @@ exports.get_drive_files = async function (req) {
103
103
  for await (let doc of ret.docs) {
104
104
  if (doc.type === "file") {
105
105
  try {
106
- files.size += doc.size;
106
+ files.sizeInBytes += doc.size;
107
107
  files.children.push({
108
108
  name: doc.originalname,
109
109
  sizeInBytes: doc.size,
@@ -126,7 +126,7 @@ exports.get_drive_files = async function (req) {
126
126
  drive_type,
127
127
  app_id_reference
128
128
  );
129
- files.size += sizeInBytes;
129
+ files.sizeInBytes += sizeInBytes;
130
130
  files.children.push({
131
131
  sizeInBytes,
132
132
  size: formatBytes(sizeInBytes),
@@ -169,7 +169,7 @@ exports.get_drive_files = async function (req) {
169
169
  const files = {
170
170
  path: req.path || "/",
171
171
  name: file_doc.data.folder_name || "/",
172
- size: 0,
172
+ sizeInBytes: 0,
173
173
  children: [],
174
174
  };
175
175
 
@@ -177,7 +177,7 @@ exports.get_drive_files = async function (req) {
177
177
  const file_path = path.join(_conf[`user_drive_path`], uid, doc._id);
178
178
  if (doc.type === "file") {
179
179
  try {
180
- files.size += doc.size;
180
+ files.sizeInBytes += doc.size;
181
181
  files.children.push({
182
182
  name: doc.originalname,
183
183
  sizeInBytes: doc.size,
@@ -200,7 +200,7 @@ exports.get_drive_files = async function (req) {
200
200
  drive_type,
201
201
  null
202
202
  );
203
- files.size += sizeInBytes;
203
+ files.sizeInBytes += sizeInBytes;
204
204
  files.children.push({
205
205
  sizeInBytes,
206
206
  size: formatBytes(sizeInBytes),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.484",
3
+ "version": "1.1.485",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {