@xuda.io/drive_module 1.1.1039 → 1.1.1041
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 +11 -9
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -87,7 +87,7 @@ const get_studio_path = function (raw_path, ref, file_name) {
|
|
|
87
87
|
exports.get_drive_files = async function (req) {
|
|
88
88
|
const {
|
|
89
89
|
from = 0,
|
|
90
|
-
to =
|
|
90
|
+
to = 99999,
|
|
91
91
|
drive_type,
|
|
92
92
|
app_id,
|
|
93
93
|
uid,
|
|
@@ -1312,14 +1312,16 @@ exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
1312
1312
|
case "studio": {
|
|
1313
1313
|
ref = await _common.get_project_app_id(req.app_id, true);
|
|
1314
1314
|
const target_dir = path.join(_conf[`studio_drive_path`], ref);
|
|
1315
|
-
file_name = path.join(
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1315
|
+
file_name = path.join(req.path, file_obj.originalname);
|
|
1316
|
+
// file_name = path.join(
|
|
1317
|
+
// req.path.replace(target_dir, ""),
|
|
1318
|
+
// file_obj.originalname
|
|
1319
|
+
// );
|
|
1320
|
+
target_file = path.join(target_dir, file_name);
|
|
1321
|
+
// target_file = path.join(
|
|
1322
|
+
// req.path !== "/" ? req.path : target_dir,
|
|
1323
|
+
// originalname
|
|
1324
|
+
// );
|
|
1323
1325
|
|
|
1324
1326
|
if (!(await fs_module.file_exists(target_dir))) {
|
|
1325
1327
|
await fs_module.mkdir(target_dir, 0o775, true);
|