@xuda.io/drive_module 1.1.1236 → 1.1.1238
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 +4 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import url from 'url';
|
|
|
11
11
|
import { convertPDF } from 'pdf2image';
|
|
12
12
|
import mammoth from 'mammoth';
|
|
13
13
|
import xlsx from 'node-xlsx';
|
|
14
|
-
import
|
|
14
|
+
import { imageSize } from 'image-size';
|
|
15
15
|
import { getPackageManifest } from 'query-registry';
|
|
16
16
|
|
|
17
17
|
// AWS SDK v3 Imports
|
|
@@ -504,11 +504,11 @@ export const delete_drive_files = async (req, job_id, headers) => {
|
|
|
504
504
|
const { data: app_obj } = await db_module.get_app_obj(app_id);
|
|
505
505
|
if (app_obj?.app_type === 'datacenter') {
|
|
506
506
|
const host = `root@${app_obj.app_hosting_server.ip}`;
|
|
507
|
-
await _utils.run_ssh_script(`ssh
|
|
507
|
+
await _utils.run_ssh_script(`ssh ${host}:rm /var/xuda/workspace_drive/${doc.server_file_name}; `);
|
|
508
508
|
} else if (app_obj?.is_deployment) {
|
|
509
509
|
const { data: datacenter_obj } = await db_module.get_app_obj(app_obj.app_datacenter_id);
|
|
510
510
|
const host = `root@${datacenter_obj.app_hosting_server.ip}`;
|
|
511
|
-
await _utils.run_ssh_script(`ssh
|
|
511
|
+
await _utils.run_ssh_script(`ssh ${host}:rm /var/xuda/workspace_drive/${doc.server_file_name}; `);
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
514
|
}
|
|
@@ -1612,7 +1612,7 @@ const get_file_info = async (file_path) => {
|
|
|
1612
1612
|
let doc = {};
|
|
1613
1613
|
doc.exif_ret = await fs_module.get_exif(file_path);
|
|
1614
1614
|
try {
|
|
1615
|
-
const dimensions =
|
|
1615
|
+
const dimensions = imageSize(file_path);
|
|
1616
1616
|
doc.dimensions = `${dimensions.width}x${dimensions.height}`;
|
|
1617
1617
|
} catch (error) {}
|
|
1618
1618
|
return doc;
|