@xuda.io/drive_module 1.1.1372 → 1.1.1374
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.mjs +3 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -220,7 +220,7 @@ export const get_drive_files = async (req) => {
|
|
|
220
220
|
size: formatBytes(doc.size),
|
|
221
221
|
extension: doc?.file_ext?.substr(1),
|
|
222
222
|
type: doc.type,
|
|
223
|
-
access_link: `https://${domain}/${drive_type}-drive/${datasource_id || app_id}/${doc._id}${ts}`,
|
|
223
|
+
access_link: `https://${domain}/${drive_type}-drive/${datasource_id || app_id || uid}/${doc._id}${ts}`,
|
|
224
224
|
is_archive: doc.is_archive,
|
|
225
225
|
public: doc.public,
|
|
226
226
|
path: doc.file_path,
|
|
@@ -1674,7 +1674,8 @@ const get_folder_size = async (dir, drive_type, app_id, uid) => {
|
|
|
1674
1674
|
let ret;
|
|
1675
1675
|
if (drive_type === 'user') {
|
|
1676
1676
|
opt.selector.uid = uid;
|
|
1677
|
-
|
|
1677
|
+
const app_id = await account_module.get_account_default_project_id(uid);
|
|
1678
|
+
ret = await db_module.find_app_couch_query(app_id, opt);
|
|
1678
1679
|
} else {
|
|
1679
1680
|
ret = await db_module.find_app_couch_query(app_id, opt);
|
|
1680
1681
|
}
|