@xuda.io/account_module 1.2.256 → 1.2.258
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 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1568,8 +1568,11 @@ const removeBg = async function (req, job_id, headers) {
|
|
|
1568
1568
|
const outputBuffer = Buffer.from(await blob.arrayBuffer());
|
|
1569
1569
|
|
|
1570
1570
|
const originalname = path.basename(url);
|
|
1571
|
-
const tempPath = path.join(os.tmpdir(), Date.now());
|
|
1571
|
+
const tempPath = path.join(os.tmpdir(), originalname + Date.now());
|
|
1572
1572
|
fs.writeFileSync(tempPath, outputBuffer);
|
|
1573
|
+
|
|
1574
|
+
const ext = drive_module.getExtensionFromUrl(url);
|
|
1575
|
+
|
|
1573
1576
|
const file_obj = {
|
|
1574
1577
|
originalname,
|
|
1575
1578
|
path: tempPath,
|