@xuda.io/account_module 1.2.267 → 1.2.269

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.
Files changed (2) hide show
  1. package/index.mjs +9 -0
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1555,6 +1555,11 @@ export const get_user_name = async function (uid) {
1555
1555
  };
1556
1556
 
1557
1557
  const removeBg = async function (req, job_id, headers) {
1558
+ const ASSET_PATH = path.join(process.cwd(), 'assets/imgly-bg');
1559
+ const config = {
1560
+ publicPath: `file://${ASSET_PATH}/`, // Points to your local folder
1561
+ debug: true, // Optional: Logs fetch attempts for debugging
1562
+ };
1558
1563
  debugger;
1559
1564
  const drive_module = await import(`${module_path}/drive_module/index.mjs`);
1560
1565
  const { url } = req;
@@ -1595,3 +1600,7 @@ const removeBg = async function (req, job_id, headers) {
1595
1600
  console.error('Error:', error);
1596
1601
  }
1597
1602
  };
1603
+
1604
+ // Step 1: Create a local assets folder (e.g., in your project root)
1605
+ const ASSET_PATH = path.join(process.cwd(), 'assets/imgly-bg'); // e.g., ./assets/imgly-bg
1606
+ fs.mkdirSync(ASSET_PATH, { recursive: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.267",
3
+ "version": "1.2.269",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {