@xuda.io/ai_module 1.1.4529 → 1.1.4530

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 +4 -4
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -7015,15 +7015,15 @@ const save_drive_file_to_disk = async function (drive_file) {
7015
7015
 
7016
7016
  const tempDir = os.tmpdir();
7017
7017
 
7018
- const tempInputPath = path.join(tempDir, drive_file.filename);
7018
+ const tempOutputPath = path.join(tempDir, drive_file.filename + '_' + Date.now());
7019
7019
 
7020
7020
  // 5. Write the downloaded image to disk
7021
- fs.writeFileSync(tempInputPath, imageBuffer);
7021
+ fs.writeFileSync(tempOutputPath, imageBuffer);
7022
7022
  /////////////////////////////////
7023
7023
 
7024
7024
  return {
7025
- filename: 'invoice.pdf',
7026
- path: '/tmp/attachments/invoice.pdf',
7025
+ filename: drive_file.filename,
7026
+ path: tempOutputPath,
7027
7027
  contentType: 'application/pdf',
7028
7028
  };
7029
7029
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4529",
3
+ "version": "1.1.4530",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",