@xuda.io/drive_module 1.1.679 → 1.1.680
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 +5 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1991,15 +1991,17 @@ exports.search_drive_files = async function (req) {
|
|
|
1991
1991
|
name: doc.originalname,
|
|
1992
1992
|
path: doc.server_file_name,
|
|
1993
1993
|
type: doc.is_folder ? "directory" : "file", //type ||
|
|
1994
|
-
file_url: get_file_url(drive_type, doc.server_file_name),
|
|
1994
|
+
file_url: get_file_url(drive_type, doc.server_file_name, ref),
|
|
1995
1995
|
mime: doc.mime,
|
|
1996
1996
|
file_ext: doc.file_ext.substr(1),
|
|
1997
1997
|
};
|
|
1998
1998
|
});
|
|
1999
1999
|
};
|
|
2000
2000
|
|
|
2001
|
+
var ref;
|
|
2001
2002
|
switch (drive_type) {
|
|
2002
2003
|
case "workspace": {
|
|
2004
|
+
ref = app_id;
|
|
2003
2005
|
const app_id_reference = await _common.get_project_app_id(app_id);
|
|
2004
2006
|
search_results = alias_results(
|
|
2005
2007
|
(await db_module.find_app_couch_query(app_id_reference, opt)).docs
|
|
@@ -2008,6 +2010,7 @@ exports.search_drive_files = async function (req) {
|
|
|
2008
2010
|
}
|
|
2009
2011
|
|
|
2010
2012
|
case "user": {
|
|
2013
|
+
ref = uid;
|
|
2011
2014
|
search_results = alias_results(
|
|
2012
2015
|
(await db_module.find_couch_query("xuda_drive", opt)).docs
|
|
2013
2016
|
);
|
|
@@ -2015,6 +2018,7 @@ exports.search_drive_files = async function (req) {
|
|
|
2015
2018
|
}
|
|
2016
2019
|
|
|
2017
2020
|
case "studio": {
|
|
2021
|
+
ref = app_id;
|
|
2018
2022
|
const directoryPath = path.join(_conf[`studio_drive_path`], app_id);
|
|
2019
2023
|
|
|
2020
2024
|
const options = {
|