@xuda.io/ai_module 1.1.4526 → 1.1.4528
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 +1 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -7063,11 +7063,8 @@ const save_drive_file_to_disk = async function (drive_file) {
|
|
|
7063
7063
|
const imageBuffer = Buffer.from(arrayBuffer);
|
|
7064
7064
|
|
|
7065
7065
|
const tempDir = os.tmpdir();
|
|
7066
|
-
const uniqueId = Date.now() + '_' + Math.random().toString(36).substring(7);
|
|
7067
7066
|
|
|
7068
|
-
const
|
|
7069
|
-
const tempInputPath = path.join(tempDir, `input_${uniqueId}${inputExt}`);
|
|
7070
|
-
// const tempOutputPath = path.join(tempDir, `output_${uniqueId}.png`); // Output is always PNG (transparent)
|
|
7067
|
+
const tempInputPath = path.join(tempDir, drive_file.filename);
|
|
7071
7068
|
|
|
7072
7069
|
// 5. Write the downloaded image to disk
|
|
7073
7070
|
fs.writeFileSync(tempInputPath, imageBuffer);
|