@social-mail/social-mail-web-server 1.7.4 → 1.7.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-web-server",
3
- "version": "1.7.4",
3
+ "version": "1.7.6",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -10,7 +10,7 @@ export default async function (file: LocalFile, ... args: any[] ): Promise<sharp
10
10
 
11
11
  try {
12
12
 
13
- const input = await file.readAsBuffer();
13
+ const input = file.path;
14
14
 
15
15
  if (args.length === 0) {
16
16
  size.width = 0;
@@ -33,6 +33,7 @@ export default async function (file: LocalFile, ... args: any[] ): Promise<sharp
33
33
  return await (sharp(input, { animated: true, pages: -1}) as any)
34
34
  .resize(size);
35
35
  } catch (e) {
36
+ console.log(e.stack ?? e);
36
37
  const err = `${JSON.stringify(size)}\n${e.stack ? e.stack : e}`;
37
38
  throw new Error(err);
38
39
  }