@xuda.io/drive_module 1.1.487 → 1.1.489
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 +0 -28
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -174,7 +174,6 @@ exports.get_drive_files = async function (req) {
|
|
|
174
174
|
};
|
|
175
175
|
|
|
176
176
|
for await (let doc of ret.docs) {
|
|
177
|
-
// const file_path = path.join(_conf[`user_drive_path`], uid, doc._id);
|
|
178
177
|
if (doc.type === "file") {
|
|
179
178
|
try {
|
|
180
179
|
files.sizeInBytes += doc.size;
|
|
@@ -357,33 +356,6 @@ exports.get_drive_file_info = async function (req) {
|
|
|
357
356
|
try {
|
|
358
357
|
const { type, drive_type, app_id, file_name } = req;
|
|
359
358
|
var { file_path } = req;
|
|
360
|
-
// const app_id_master = await _common.get_project_app_id(app_id, true);
|
|
361
|
-
// if (drive_type === "workspace") {
|
|
362
|
-
// if (!file_path.includes(app_id)) {
|
|
363
|
-
// return {
|
|
364
|
-
// code: -400,
|
|
365
|
-
// data: "error - file_path unauthorized",
|
|
366
|
-
// };
|
|
367
|
-
// }
|
|
368
|
-
// }
|
|
369
|
-
|
|
370
|
-
// path.basename(file_obj.originalname)
|
|
371
|
-
|
|
372
|
-
// if (drive_type === "workspace") {
|
|
373
|
-
// file_path = path.join(_conf.workspace_drive_path, app_id_master, file_path);
|
|
374
|
-
// }
|
|
375
|
-
// var doc = {};
|
|
376
|
-
|
|
377
|
-
// var doc_id;
|
|
378
|
-
// if (drive_type === "studio") {
|
|
379
|
-
// const target_dir = path.join(_conf[`studio_drive_path`], app_id_master);
|
|
380
|
-
|
|
381
|
-
// doc_id = file_path.replace(target_dir, "");
|
|
382
|
-
// } else {
|
|
383
|
-
// doc_id = file_name;
|
|
384
|
-
// }
|
|
385
|
-
|
|
386
|
-
// const doc_ret = await db_module.get_app_couch_doc(app_id_reference, doc_id);
|
|
387
359
|
|
|
388
360
|
let doc_ret,
|
|
389
361
|
doc_id,
|